3

I have installed PHP v7.2. when I do php -v in my terminal, I get:

$ php -v
PHP 7.2.0-2+ubuntu16.04.1+deb.sury.org+2 (cli) (built: Dec  7 2017 20:14:31) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.0-2+ubuntu16.04.1+deb.sury.org+2, Copyright (c) 1999-2017, by Zend Technologies

Which php, gives me, /usr/bin/php?

But there is no php.ini in that directory. How can I find the location of php.ini?

pa4080
  • 29,831

2 Answers2

8

You cand find the php.ini file in the following directories:

  • /etc/php/7.0/apache2/php.ini
  • /etc/php/7.0/cli/php.ini

Hope it helps.

galoget
  • 2,963
1

You can also make a file that calls the phpinfo() function. Simply add the following code into a file such as phpinfo.php in your webroot, and access it via the webserver.

<?php
phpinfo();
?>

Where is my PHP php.ini Configuration File Located

vidarlo
  • 22,691
Neri
  • 111