Knowledgebase: PHP
Overriding PHP Settings
Posted by on 30 May 2012 01:02 PM

Sometimes, your site may require a local adjustment to the default or system-wide php.ini values. This might be to increase the maximum file size allowed to upload through a form, or some other setting.

Overriding PHP settings

You will need to create a custom php.ini and place it in your home directory via a FTP client or through File Manager in cPanel

- The php.ini file must contain the variables you'd like to adjust, for example:

upload_max_filesize = 24M
post_max_size = 24M

The above directives will increase the max file size in uploads.

Once the file is created, you will need to edit (or create if not present) the .htaccess file that is within your public_html, and make sure the following line is placed on the very top of it:

SetENV PHPRC /home/username

Please make sure you replace "username" with your actual cPanel username.

That is all, the changes will be reflected automatically.



Attachments 
 
 php.ini.txt (39.89 KB)
(9 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion
ERROR: This domain name (kb.asmallorange.com), does not match the domain name in the license key file help.asmallorange.com.

For assistance with your license, please contact the Kayako support team: https://support.kayako.com