Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where can I find the php.ini for php-cli

Tags:

php

php-ini

It appears that the php command line is using a different php.ini from the main php interpreter. I am using Ubuntu 10.4. My problem is that in the main php.ini I have included an extra path for an external library, but in the cli version this is not present, and so I have a path inclusion error.

thanks

like image 741
Elzo Valugi Avatar asked Jun 16 '10 20:06

Elzo Valugi


People also ask

How do you get to PHP ini?

If you can access one of your PHP files, open it in a editor (Notepad) and insert phpinfo(); after <? php on a new line. This will tell you the php. ini location.

Where is PHP ini located 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 config ini PHP?

Configuration of php. ini file: Whenever we install PHP, we can locate the configuration file inside the PHP folder. If using xampp, we can find the configuration file in one or many versions, inside the path '\xampp\php'.

Where is PHP ini window?

If you're running Windows, you'll likely find the php. ini file within the directory of your PHP installation in the system drive.


1 Answers

Just ask PHP:

php -i |grep php\.ini 
like image 116
timdev Avatar answered Sep 21 '22 20:09

timdev