Difference between revisions of "SuPHP on XMission"

From XMission Wiki
Jump to: navigation, search
(new page)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{archived}}
 +
 
With the transition to Apache 2 servers, a new solution was needed to allow users  to execute PHP scripts, while maintaining security. suPHP is a tool for executing  PHP scripts with the permissions of their owners.
 
With the transition to Apache 2 servers, a new solution was needed to allow users  to execute PHP scripts, while maintaining security. suPHP is a tool for executing  PHP scripts with the permissions of their owners.
  
Line 18: Line 20:
 
The corresponding php.ini format is:
 
The corresponding php.ini format is:
 
<pre>include_path = "/home/users/u/username/cgi-bin"</pre>
 
<pre>include_path = "/home/users/u/username/cgi-bin"</pre>
 +
 +
 +
[[Category:Hosting Archives|SuPHP on XMission]]

Latest revision as of 14:47, 14 January 2020

Archives.png


With the transition to Apache 2 servers, a new solution was needed to allow users to execute PHP scripts, while maintaining security. suPHP is a tool for executing PHP scripts with the permissions of their owners.

Some users will have php configuration values in their .htaccess files. Some configuration lines won't work with suPHP - at least, not within the .htaccess file. In particular, "php_value" and "php_flag" values are the two that are problematic.

First, you must move all lines beginning with "php_value" and "php_flag" from your .htaccess file into a file called php.ini (in your public_html directory). Then, you must add a line to your .htaccess file like the one below (with "u" being the first letter of your username, and of course "username" being your actual username).

suPHP_ConfigPath /home/users/u/username/public_html

You will need to remove php_value and php_flag from ALL .htaccess files you may have. However, you only need to add the suPHP_ConfigPath line in the .htaccess file in your public_html directory only.

Secondly, you must make sure that the lines you put in php.ini are in the correct format:

setting_name = setting_value

Let's say you have the following line in your .htaccess file:

php_value register_globals 0

the corresponding php.ini format is as follows:

register_globals = Off

Notice how the value 0 becomes Off (without quotes) and 1 becomes On. If your php_value has quotes like the following, for example:

php_value include_path "/home/users/u/username/cgi-bin"

The corresponding php.ini format is:

include_path = "/home/users/u/username/cgi-bin"