Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.ini is nonexistent Loaded Configuration File (none)

Tags:

linux

php

I have compiled php and apache successfully, without specifying the directory for the php config file. I want to add pear features, but there doesn't appear to be a php.ini anywhere.
In my phpinfo, it says

Configuration File (php.ini) Path /usr/local/apache2/php/lib
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)

I went to the /usr/local/apache2/php/lib directory, and there was, indeed nothing there. I also searched for php.ini, and didn't get any results whatsoever. I need to change things in php.ini, and I don't know how php is even working without one. I am just wondering whether I need to recompile php with a config directory, and how to find/acquire a php.ini so that I can fix some things.

like image 416
jstrieb Avatar asked May 22 '12 23:05

jstrieb


1 Answers

You have to copy the file php.ini-dist from PHP source. Standard way is copying such file to /usr/local/lib/php.ini.

like image 147
inigomedina Avatar answered Sep 21 '22 19:09

inigomedina