Find the correct php.ini file [closed] Find the correct php.ini file [closed] php php

Find the correct php.ini file [closed]


As apache call php by mod_php, the configuration info 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:

<?phpphpinfo();

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

Then you will see all the configuration info.


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 is working as expected!

Thank you to anyone that tried to help! Much appreciated!