| Home Register Memberlist Help Search Quick Links No Replies |
|
||||||
| PHP PHP-based Tutorials and FAQs |
![]() |
![]() |
|
Thread Tools | ![]() |
|
#1
|
||||
|
||||
|
In order to convert your server from DSO to suPHP for the PHP Handler, you may wish to follow these steps.
Switch to suPHP Handler If your server's EasyApache already had suPHP compiled, you can do this in WHM > Apache Configuration > PHP and SuExec Configuration area. There will be a dropdown next to your PHP version with suphp listed to select it. Simply choose suphp, then click "Save New Configuration" button. If suPHP is not listed for the handler, you will have to recompile Apache to include it first. This can be done either in WHM > EasyApache (Apache Update) area or using the command /scripts/easyapache in root SSH. During EasyApache, you will find suPHP listed in the Short Options List as Mod SuPHP. After Apache has finished recompiling, the suPHP should then show up now in WHM > Apache Configuration > PHP and SuExec Configuration area to select. After you've changed the PHP handler to suPHP, you can then follow the rest of the steps to convert the accounts to properly work under it. Change all permissions for folders from 777 to 755 The following command will change the folders inside public_html for all accounts to 755, it doesn't just list the ones needing changed: Code:
find /home/*/public_html -type d -exec chmod 755 {} \;
The following command will change the files inside public_html for all accounts to 644, it doesn't just list the ones needing changed: Code:
find /home/*/public_html -type f -exec chmod 644 {} \;
Code:
for i in `ls /var/cpanel/users/`; do chown -R $i:$i /home/$i/public_html ; done for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html ; done for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html/_vti_pvt ; done A strong word of caution here on using a recursive chown for these ownership permissions. If you have other users on your system with shell access besides yourself, please see this location for why to be careful about using a recursive chown to fix these ownership issues. Use the steps noted at this post as a guide for how to fix such ownership issues. Remove any php_value and php_flag entries in .htaccess files as they will produce an Internal Server Error if in an account's .htaccess file. Here are the commands to find all such files: Code:
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_value' '{}' \;
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_flag' '{}' \;
Code:
cp /usr/local/lib/php.ini /home/username/public_html/php.ini chown username:username /home/username/public_html/php.ini Code:
suPHP_ConfigPath /home/username/public_html/
__________________
Miraenda ~ Ex uno disce omnes ~ |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Handler (CGI, DSO, FCGI, suPHP) Chart Comparison | Miraenda | PHP | 0 | 2 July 2010 10:25 |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. |
||