How can I find my php.ini file?
Linode
Linode Staff
I need to edit my php.ini configuration, but I'm not sure where it is. How can I find it?
2 Replies
nmelehan
Linode Staff
If you create a 'phpinfo' page on your website, it will show the location of the php.ini
that is loaded by your web server.
To do this, make a new file with the following content:
<?php
phpinfo();
?>
Then, save it to the document root of your web site and give it the name phpinfo.php
. Load this page in your browser, and it will list the location of your php.ini
file.
Afterwards, you should consider removing that page so that your PHP's parameters are not exposed.