Find the correct php.ini file

As Apache calls PHP by mod_php, the configuration information is not the same with that in command line:

Create a file named index.php at the root directory, with the code below in it:

<?php
    phpinfo();

then open it in your browser: /index.php.

Then you will see all the configuration information.


Create a PHP file and put the following code in it:

phpinfo();

Open the file in your browser and find loaded configuration file. Presto.


The answer to this was very simple. Somewhere in my php.ini file I had a syntax error (or an error of some kind).

To fix this, I downloaded the latest php.ini file from http://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=HEAD and then changed the values for upload_max_filesize and post_max_size, restarted Apache, reloaded my php_info() and everything was working as expected!