How do I open PHP ini in 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.Try one of these solutions In your terminal, type find / -name “php.ini” In your terminal, type php -i | grep php.ini. It should show the file path as “Configuration File (php.ini) Path => /etc” How do I open a PHP ini file?

How do you get to PHP ini?

On Apache, php. ini is usually located in /etc/php/8.1/apache2/php. ini .

How to open&edit the PHP INI file?

The other easiest way to locate the php.ini file is using locate command. To open & edit the php.ini file I am using vim/vi editor. Read more about Beginners guide for vi/vim editor.

How to talk to PHP in terminal?

1 In your terminal type find / -name “php.ini” 2 In your terminal type php -i | grep php.ini . … 3 If you can access one your php files , open it in a editor (notepad) and insert below code after <?php in a new line phpinfo (); This will tell … 4 You can also talk to php in interactive mode. …

Leave a Reply

Your email address will not be published. Required fields are marked *