/ Web Development / PHP

Article ID:  00185
Rating:  0.0 / 5.0 (0 votes)
Views:  1938
Created:  Jun-19-2006

Rating
Did you find this article helpful?


Email Article To A Friend

Print Article


php.ini on suPHP servers

Issue

What should my php.ini file look like if my account is using suPHP?

Solution

In php.ini, there is a different format to define your PHP settings. All lines are in the following format:

setting_name = setting_value

So, this means if you move the settings from .htaccess (the typical way to make php changes) to php.ini, you must convert the format. 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. Now if your php_value has quotes like the following, for example:

php_value include_path ".:/home/user/lib"

The corresponding php.ini format is:

include_path = ".:/home/user/lib"

For the PHP settings you do not have in your php.ini file, PHP will use our default configurations. It will not use the server php.ini but rather a default one. You may need to set other settings. You may create a phpinfo.php file in public_html with the beginning and ending php tags and the following in between to see any changes by browsing it:

<?php

phpinfo();

?>

For info on making subfolders inherit the settings, please see the ".htaccess on suPHP servers" Knowledge Base Article 00184.

Related Articles