php.ini file not being read

liunx

Guest
Cannot get my php.ini file to be read.
Running freebsd5.3 with apache2.0.53 with php5.
php5 loades as a module.
The server is runing fine with all sites working well. And the php scripts are being read fine as well. In fact everything is working fine.
But when I do changes in the php.ini file none of the work.
Have looked at phpinfo path= /usr/local/php5 so php.ini is not being read. have put php.ini file in the /usr/local/php5 but it is still not being read.
also chmod the php.ini to 777 and still not being read.
Also tried to put the php.ini file in other locations like /etc and /usr/local/lib but no luck

I am lost here please help

thanksDo you have a PHPIniDir line in httpd.conf?Also, do a phpinfo()... what does it say it's using for the ini path?

I also have to ask, just to make sure you're not missing the obvious: you're restarting Apache after you make your php.ini changes, correct?

Third, are you building PHP yourself, or using ports/packages?Thank you for your replies.
I have done the phpinfo bit. The path php is looking for the php.ini file is /usr/local/php5. I have placed a php.ini file there but does not work.
YES I RESTART APACHE EVERYTIME I DO ANY CHANGE. Though i would say that as it might come up.

PHPIniDir line in httpd.conf============= I donot have one in httpd.config. And when I had one and specified the path yes php.ini did work.

is as PHPIniDir line in httpd.conf a must or is there a another way ?

When i used the PHPIniDir line my mail function in php stopped working. inspite of me setting the correct path for the sendmail file in the php.ini.

eager to hear your answers. Thanks in advance.


using ports and packages. a bit of infor from phpinfo

Configuration File (php.ini) Path /usr/local/php5

'./configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql' '--prefix=/usr/local/php5' '--disable-cgi' '--enable-force-cgi-redirect' '--with-config-file-path=/usr/local/php5'Put the "PHPIniDir usr/local/php5" line into http.conf. Search your server for any instances of php.ini. Remove them all except the one in php5. Restart Apache.

Your mail function likely stopped working because of configuration settings, not because you told Apache where php.ini was.Put the "PHPIniDir usr/local/php5" line into http.conf............................................
...................the PHPIniDir is that line normally supposed to be there specifying where php.ini is present. Or am I entering now as I have not configure correctly. Like I said when I did use the phpinidir line the php.ini is recoginsed. Just trying to learn. Thanks for your help greatly appreciated.

the site has been runing fine so far................wondering what php.ini file has been used up to now was it the php.ini-recommended or that dist one. made a few changes inthem as well but did not do any difference.

any ideas as to why my mail function stops working.
phpinfo give the below information
sendmail_path[local value]/usr/sbin/sendmail -t -i [master value]/usr/sbin/sendmail -t -i

also the phpinidir I though was for a windows install. I am using freebsd.
<!-- m --><a class="postlink" href="http://php.mirrors.ilisys.com.au/manual/en/install.windows.apache2.php">http://php.mirrors.ilisys.com.au/manual ... pache2.php</a><!-- m -->

Thanks
 
Back
Top