How to create a custom php.ini file

There are some variables in the php.ini file that can be overwritten, a common request is how to change the PHP file upload limit.

You can do this by creating a custom php.ini file in the directory you want to use (where your script resides).

Here is an example;

On your computer open a new document in Notepad, inside enter the command;

upload_max_filesize = 5M
post_max_size = 5M

(this example shows the limit being set to 5MB, you can change this to your required max file/post size.

Then save the file and name it php.ini and upload it to the directory where your scripts reside.

For PHP5, use php5.ini instead of php.ini.



Similar posts you may find useful..:

Fatal error: Allowed memory size of 8388608 bytes exhausted

PHP5

Setting “register_globals” to ON in PHP

Installing Magento, Magento Installation

Line Break

Author: Doug (64 Articles)

I'm Doug, Reseller Account Manager here at Pixel Internet. If you are one of our resellers you would have almost certainly spoken to me at some point. You can find me on our Forum where I am happy to answer any questions you may have regarding our reseller plans, or you can contact me direct at doug [at] pixelinternet.co.uk.

3 Comments to “How to create a custom php.ini file”

  1. [...] (more information on creating a custom php.ini file can be found here – create a custom php.ini file) [...]

  2. Jay says:

    Finally. I’ve been looking for clear and easy to understand instructions all day. Thank you so much.

  3. admin says:

    You are more than welcome!

Leave a Reply

Search Blog

The Cloud

Pixel Internet specialise in web hosting for the following Open Source software packages, most of which include 'one-click-installation' via your control panel!

Click on a link below for more information regarding these packages and what we can offer.

Close this panel

Follow Pixel Internet on Twitter and Facebook