php.ini is nonexistent Loaded Configuration File (none)

linux, php

Solution

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

Problem

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.

Original source