ReplaceText can be enhanced to accept an optional limit for the number of pages to return from the search, which would provide a way to resolve bug 38170 without needing to alter the server's PHP configuration. For example, today I tried running ReplaceText on 70000 pages, and it's only a matter of time before I'll try running it on millions of pages.
With a large enough replace operation, the incorrect namespace error is less of a problem than the page size and load time at the "are you sure?" verification stage of ReplaceText. That can render ReplaceText practically unusable even when using the server configuration workaround suggested in bug 38170.
The workaround I'm currently using is to enter all the possible page prefixes to ensure a predictable fraction of pages will be found and replaced. That works for 70,000 pages. It probably won't work anymore for millions of pages, simply because the fraction of pages will still be too large to produce a reasonably verification page size and load time.
This problem could also be helped with a "skip verification page" option, but given the power of ReplaceText, skipping the verification page is probably foolish.
Version: unspecified
Severity: critical
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=38170