On the command line execute: Show
You will get something like:
That's from my local dev-machine. However, the second line is the interesting one. If there is nothing mentioned, have a look at the first one. That is the path, where PHP looks for the You can grep the same information using phpinfo() in a script and call it with a
browser. It’s mentioned in the first block of the output. Last updated on June 7th, 2022 | 2 replies As there are multiple versions of PHP with different sever configurations, php.ini could be located in several different folders. Method 1One way to find out exactly which info.php
Load this file in your browser, press
This will tell you the exact location of the php.ini file you want to edit. Method 2In Linux, run this command to locate the
Or in Windows Command Line:
The result should be something like this:
In the above example, we can see that the PHP install is located in CLI
Apache
Nginx or Apache with PHP-FPM
Method 3Using the You should see a list of php.ini files here. Try editing one of them and restarting you web server to see if makes the required changes. Editing php.ini in LinuxApacheOn Apache, To edit:
However, if you are using PHP FPM, it may be located in To edit:
To save file and exit, press You must restart Apache after altering
If you are using PHP-FPM, you must restart that service. Replace
Nginx or Apache with PHP-FPMNginx uses PHP FPM and
Save and exit (press You must restart Nginx after altering
Older VersionsFor versions of Ubuntu lower than 16.04, Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie. p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how. Where is the PHP ini file in Linux?The default location for the php. ini file is: Ubuntu 16.04: /etc/php/7.0/apache2. CentOS 7: /etc/php.
Where is located PHP ini?ini is usually located in /etc/php/8.1/fpm/php.
Where is PHP ini file in RHEL?ini file is found at /etc/php. ini. There are also a couple more configuration files from the php package. The php package requires the httpd package to be installed, which makes sense as these are the configuration files that tell Apache how to work with PHP.
How do I find PHP ini Ubuntu?the 'correct' one is in the apache2 subdirectory. – Joren. ... . use updatedb; locate php. ini instead of find . ... . @Michael The file is /etc/php/5.6/apache2/php.ini in Ubuntu 16.04 LTS Xenial Xerus, where 5.6/ is the version of php installed.. |