Cannot use browser to attempt to run any php scripit in a cli directory.
When ever one is unsure about a php script, suggest getting a peak at it using:
cat replace.php |more
You are not executing it then and can see comments that might be contained in the script and can (maybe) determine what it will do.
CLI scripts normally show a help screen displaying what it does and options/switches one might use with the script.
The admin/tools/replace/cli/replace.php script has this for help:
"Search and replace text throughout the whole database.
--search=STRING String to search for.
--replace=STRING String to replace with.
--shorten Shorten result if necessary.
--non-interactive Perform the replacement without confirming.
-h, --help Print out this help.
\$ sudo -u www-data /usr/bin/php admin/tool/replace/cli/replace.php --search=//oldsitehost --replace=//newsitehost
They always suggest using the web service user (www-data above is for Ubuntu/Debian) but they can be run as root user as well and without sudo as well as full path to php IF php-cli is found in command line environment.
So for example:
If site has a valid certificate (not self-signed) and one can see the site via text based browser from the server itself:
lynx https://test.x.x then one would use the httpsreplace script. Site running https has to have port 443 opened in server firewall and all firewalls in front of server must allow 443 traffic to the server ... as well as port 80.
Since those scripts will attempt to change every URL it finds in the DB strongly suggest making a backup of the DB before executing.
For the site to be reached by the fully qualified domain name you've shown here in forums it must be in DNS. From my location in San Antonio, Tx. that test. site cannot be reached ... it is not in external DNS of your domain.
'spirit of sharing', Ken