How do I make changes to php settings?

Please login to your control panel and click on "security notes" in front of PHP4 Version in the left column. You can find all the details on how to make changes to php e.g. register_globals etc.

In short, you need to use your own php.ini file in the folder where the php script executes.

For php5, you can use one php.ini file in your public_html folder. For more details click on "Click to View" in front of PHP5 Version in your control panel.


You can download the stock version of php4 and php5 files from here as well:


Please rename the file to php.ini and edit it to make changes to php settings.

NOTE again for php4 that you need to place php.ini in the folder where php script executes. So if you place php.ini in public_html/ and your script executes at public_html/somefolder/ (or via web the address is http://www.example.com/somefolder/) then it will not load the php.ini settings. The php.ini file needs to be in public_html/somefolder/ as well.

For php5, please place your php.ini in public_html and it will be used for all sub-foloders.

IMPORTANT NOTE: you need to place entire php.ini file with all settings in it. You can not place just a few settings.

php.ini precendence rules

php4: local folder (higher precedence) > default global php.ini (at server level)

php5: local folder (higher precedence) > public_html (or DOCUMENT_ROOT) > default global php.ini (at server level)

php5 with shared SSL: local folder (higher precedence) > default global php.ini (at server level)

Examples:

1) For php4, if you need to change the default settings, you need php.ini in each folder where the php script executes over the web.

2) For php5, you can place the php.ini either in the DOCUMENT_ROOT (see note below) or in each folder where the php script executes.

What is DOCUMENT_ROOT?
For your main domain, it is /home/userid/public_html/ and for any subdomain/addon domain, it is /home/userid/public_html/subdomain/

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How do I provide streaming - Audio / Video ?

We DO NOT have Real Audio server software running on our servers. However, you can stream Real...

What are some basic software paths?

Sendmail: /usr/lib/sendmailPerl5: /usr/bin/perlServerpath: /home/username/public_htmlRoot path:...

How do I change File Permissions?

If you're new to scripting, or getting the dreaded "Internal Server Error" when you try to run a...

What is SSI (Server side includes) and how can I use it?

Server Side Includes (SSI) is a feature of CGI that enables you to dynamically insert a piece of...

Where do I place CGI scripts?

Although you can place cgi scripts in random directories throughout your site, it's best if you...