Well it depends on the Linux distribution you are using, the version of php and the way you install it with Apache web server. Php.ini may be here:
/etc/php.ini
Or here:
/etc/php/php.ini
/etc/php5/php.ini
Or here:
/usr/bin/php5/bin/php.ini
Anyway, you can always find any file named php.ini in this manner
find / -name php.ini
The simplest yet most powerful usage of the renowned find command. By its help I was able to locate the php.ini on my Ubuntu 9.04 Apache2 and PHP5:
/etc/php5/apache2/php.ini
Related Posts
- Linux: Check how much disk storage each directory takes up (Disk Usage command – du)
- Apache, PHP: Function to Get and Return PHP Version Number and Apache Version
- Linux: How to open and extract an RAR zipped file and unrar the archive?
- PHP: open_basedir in php.ini to Restrict and Limit PHP File Accesses to a Certain Directory
- How to bring down / optimize memory usage in your unmanaged Linux VPS box and avoid OOM (Out Of Memory) errors?

{ 2 comments… read them below or add one }
Thanks.
I installed Nginx, and found the file with the commend “find / -name php.ini”
Thanks for this information. Now I’m modifying php.ini on my local server. Thanks again. Regards.
{ 2 trackbacks }