One of my most common requests is a script to handle system changes needed when converting to SuPHP and though such an automation script has been a part of our toolbox at My Server Expert for a long time, here is a variation of it for the rest of you ....
http://www.myserverexpert.com/build/dso2su.sh
Background:
-----------------------------------------------------------------------------
Though converting from DSO (Apache Module) based PHP to SuPHP is easy to do with EasyApache, this only changes the PHP platform on the system and doesn't address the possibly thousands of permissions, ownerships, and .htaccess files you have to edit to get SuPHP working with your existing accounts which may already be full of disallowed items such as scripts with the owner set to "nobody", script files or folders set to 777, or .htaccess files trying to set PHP configuration overrides. If you don't get rid of these items, scripts will fail or the sites will throw Error 500 after converting over to SuPHP as your new PHP platform. This script helps avoid that problem!
Converting to SuPHP (Basic Rundown):
1. Use EasyApache to setup SuPHP
2. Set PHP Config to PHP 5, SuPHP, SuExec
3. Run the script given above ...
4. Check your /var/log/messages log to see if there are any user
accounts requiring special handling or a custom PHP.INI file
That's it! You should be up and running on SuPHP!
No warranties are made or implied. Use the above script at your own risk!
http://www.myserverexpert.com/build/dso2su.sh
Background:
-----------------------------------------------------------------------------
Though converting from DSO (Apache Module) based PHP to SuPHP is easy to do with EasyApache, this only changes the PHP platform on the system and doesn't address the possibly thousands of permissions, ownerships, and .htaccess files you have to edit to get SuPHP working with your existing accounts which may already be full of disallowed items such as scripts with the owner set to "nobody", script files or folders set to 777, or .htaccess files trying to set PHP configuration overrides. If you don't get rid of these items, scripts will fail or the sites will throw Error 500 after converting over to SuPHP as your new PHP platform. This script helps avoid that problem!
Converting to SuPHP (Basic Rundown):
1. Use EasyApache to setup SuPHP
2. Set PHP Config to PHP 5, SuPHP, SuExec
3. Run the script given above ...
Code:
# wget http://www.myserverexpert.com/build/dso2su.sh
# chmod 700 ./dso2su.sh
# ./dso2su.sh
accounts requiring special handling or a custom PHP.INI file
That's it! You should be up and running on SuPHP!
No warranties are made or implied. Use the above script at your own risk!
Last edited: