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
You have to copy the file php.ini-dist from PHP source. Standard way is copying such file to /usr/local/lib/php.ini.
The problem is that you compiled php without the --with-config-file-path=PATH option.
Try to reconfigure php using this option. Then run "make clean", "make" and "make install" again in this order. You must run "make clean" for this to work.
first check is there /etc/php.ini exists , if no try to copy it
sudo cp /etc/php.ini.default /etc/php.ini
else
sudo cp /etc/php.ini.default /usr/local/lib/php.ini
then reload the webserver and try to see result with
php --ini
ini file must end with .ini and not php.ini-dist. Remove the -dist as it looks like a notepad file (in Windows) and cannot be read by the system.
Restart Apache and check you phpinfo() output.