screenshot and description of phpinfo() output

Using the phpinfo() function you can easily find the location of the php.ini file on the server. Here’s the code to generate the phpinfo information pictured above:

<?php
phpinfo();
?>

Shown with the red arrows in the screenshot above:

#1 - this is the version of PHP
#2 - these are the configured library. For example ‘–with-mcrypt=/usr/lib’ means the mcrypt library is enabled
#3 - the full path location to the php.ini file. In the screenshot above the location is /usr/local/Zend/etc/php.ini

Most likely the php.ini file will be owned by root, so unless you have root you’ll probably have to ask your hosting company to make changes to this unless you have root. Also PHP will need to be restarted after changing these settings.