Show 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. How do I open PHP ini in Ubuntu terminal?To open the default php. ini file for editing, use one of the following commands (depending on which Linux distribution you're using): Ubuntu 16.04: sudo nano /etc/php/7.0/apache2. CentOS 7: sudo nano /etc/php.
How do I open and edit PHP ini in Ubuntu terminal?How to Edit PHP ini File in Ubuntu Terminal. sudo nano /etc/php5/apache2/php.ini. sudo nano /etc/php5/apache2/php.ini. Change PHP parameters. ... . max_execution_time = 60. max_execution_time = 60. Once you have changed the configuration values, save and exit the editor. ... . sudo service apache2 restart. sudo service apache2 restart.. Where is my PHP ini file in Ubuntu?The path of php. ini in Ubuntu is /etc/php5/apache2 . Open the terminal and start typing following commands. To view the files present in apache2 directory, type ls command.
How do I open a PHP ini file?For Windows, you can find the file in the C:\xampp\php\php. ini -Folder (Windows) or in the etc -Folder (within the xampp-Folder). Under Linux, most distributions put lampp under /opt/lampp , so the file can be found under /opt/lampp/etc/php. ini .
|