suphp tips

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.

  • 1 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

Enable/Disable certain php functions for your website

Create a folder named suphpconfig inside your home directory i.e. /home/cpanelusername and add...

register_globals On

register_globals On 1) Make a folder called suphpconfig inside /home/username 2) create a new...

mod_userdir Protectio

We have enabled mod_userdir Protection on the server. Apache's mod_userdir allows...

suphp more info

Advantages of suphp1) suphp allows php files to run as the cpanel user instead of apache user (...

How do I send email from ASP using SMTP Authentication.

Please note that our mail server is configured with Authentication. Below is...

Powered by WHMCompleteSolution