A few years ago I installed Apache 2.2x and PHP 5.3.1 on a Linux server I maintain. I used .tar.gz\'s and built them as instructed (instead of rpms and what-have-you). And
There are several valid ways already mentioned for locating the php.ini file, but if you came across this page because you want to do something with it in a bash script: