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

PHP5

Fatal error: Allowed memory size of 8388608 bytes exhausted

Setting “register_globals” to ON in PHP

Installing Magento, Magento Installation

Change Magento admin folder name

Line Break

Author: Doug (93 Articles)

Account Manager at Pixel Internet, Doug has been with us from day one. With over 10 years experience working in the web design and search engine optimisation industry, Doug's input and contribution to the growth of the company has been invaluable.

6 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!

  4. David says:

    When installing a new joomla module I have received the ‘Fatal error: Allowed memory size of 8388608 bytes exhausted’?

    I have followed your instructions and created the php.ini file and uploaded it to the main directory – regrettably the installation failed again.

    I have also tried the directory …./libraries/joomla/filesystem/archive/zip.php on line 284 regrettably failing again.

    Am I using the correct script directory?

  5. Doug says:

    Hi David

    If you are a customer of ours, can you raise a support ticket and our support team will resolve the issue for you.

    Thanks ;)

  6. Great post. I was checking continuously this blog and I am inspired! Very useful info particularly the remaining phase :) I take care of such information much. I was seeking this particular information for a very long time. Thank you and good luck.

Leave a Reply

Search Blog

The Cloud

Pixel Internet specialise in web hosting for the following Open Source software packages, many 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