suphp tips
Posted by Dan Moses on 15 September 2008 03:29 AM
About suphp
----------------------
This is the most flexible way of serving PHP requests and tends to be very secure. PHP scripts are executed by the user who owns the VirtualHost serving the request.

http://www.cpanel.net/support/docs/ea/ea3/ea3php_php_requests.html



If you are setting up custom php settings, the custom php.ini file will be required in a folder where the php script needs to execute. Or you can place php.ini anywhere and have this directive in public_html/.htaccess

suPHP_ConfigPath /home/username/php5-config

where username is your cpanel account username, and php5-config is just a folder name (you can name it anything) and it will pick php.ini from that folder. Yes, you can have php.ini outside of your webroot in suPHP. This is a new feature.

5. To activate php5 on a subfolder or in your whole account, this directive was added in .htaccess in phpsuexec

AddHandler application/x-httpd-php5 .php .php3 .phtml

or a variant of it. Now this must be proceeded by the marker comment to block cpanel from changing your settings:

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php .php3 .phtml



---> suppose you want register_globals On , for any site.

1) Make a folder called suphpconfig inside /home/username
2) create a new file called php.ini inside /home//suphpconfig/
3) Add the following code in /home/username/suphpconfig/php.ini

register_globals = On

4) Create a file called .htaccess insde /home/username/public_html folder and add the following code in .htaccess file :

suPHP_ConfigPath /home/username/suphpconfig



where username is your cpanel account username. Now register_globals is on for your site, even if it is turned off on the server.

Note:- This if for servers having suphp setup only, if you have any doubts, contact support or live chat first.


(530 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).