How do I make changes to PHP settings?

You need to use your own php.ini file in the folder where the PHP script executes. For more details click on "PHP Configuration" in your control panel.

For PHP 5, you can use one php.ini file in your public_html folder. 

Note: This applies to all JaguarPC shared and semi-dedicated hosting accounts.

You can download the stock version of PHP 4 and PHP 5 files in cPanel under "PHP Configuration".

Please be sure the file is named php.ini and edit it to make changes to PHP settings.

NOTE: Again, for PHP 4 you need to place php.ini in the folder where the 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 PHP 5, please place your php.ini in public_html and it will be used for all sub-folders.

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

php.ini precendence rules

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

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

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

Examples:

1) For PHP 4, 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 PHP 5, 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/
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

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...

What is PHP and how do I use it?

PHP is a powerful server-side scripting language that can be used to extend the functionality of...