• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

paths in scripts need global change

H

hypercog

Guest
I appear to have succesfully migrated from 7.x to 8.1. (such a great concept)
Well enough, anyway.

One big problem remains:
ALL SCRIPTS ARE BROKEN
I know this is because I need to change all instances of "/home/httpd/vhosts" to "/var/www/vhosts" in EVERY php, perl, cgi, etc., SCRIPT in all of my domains.

Question for Linux expert:
Is there a shell command/script, or some trick of redirection that will either find/replace the string in all of the hundreds of files it occurs in, or fool the existing script to point at the correct directory?

Thanx
 
There's two things you could do to resolve this issue:

1) Create the directory /home/httpd/vhosts and then edit the file /etc/psa/psa.conf replacing 'HTTPD_VHOSTS_D /var/www/vhosts' with 'HTTPD_VHOSTS_D /home/httpd/vhosts'; or
2) Download rpl from http://www.laffeycomputer.com/rpl.html and run the command 'rpl -R "/var/www/vhosts" "/home/httpd/vhosts" /home/httpd/vhosts', which will search through every file and replace any instances of '/home/httpd/vhosts' with '/var/www/vhosts'
 
Back
Top