Ubuntu – php.ini does not exist

16.04PHPphp7

There is no php.ini after installing php (7.1) on ubuntu 16.04

I installed php using apt install php. I already tried to find the php.ini using the find command, but there is no file called php.ini anywhere.

Best Answer

I recently setup a wordpress server and ran into this same issue.

I used apt-get install php

Everything seemed to be normal except I could not find the php.ini file either. That file is usually located in /etc/php/7.0/apache2/php.ini

My solution, and I guess is also your solution would be that apache mod didn't get installed for php. So all you need to run is apt-get install libapache2-mod-php

I also bounced apache just to be safe, but then my php.ini file was then located where I expected it in /etc/php/7.0/apache2/php.ini

Related Question