turtlefox Posted July 2, 2009 Share Posted July 2, 2009 Trying to learn php using apache, have been doing fine so far, except for my next task I need to edit php.ini. Had some trouble getting php to install because the book I'm using made no mention of PHPInidir. After discovering this I put it into the httpd.conf file under my load module as PHPIniDir C:/WINDOWS/. Didn't work. Changed it to PHPInidir C:/PHP (where my php files reside, except for the ini file which is in WINDOWS), and it works. Putting php.ini into the php folder breaks it. Leaving it in windows fixes it. My problem is I'm now trying to edit the php.ini file and it doesn't seem to be affected, as if apache isn't actually reading that file. There is no .ini file in my php folder. Is there some information I'm missing here? Again if I change phpinidir to the C:/WINDOWS where my ini file actually resides, it breaks, if I move php.ini to C:/PHP in accord to my currently configured phpinidir, it breaks. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 3, 2009 Share Posted July 3, 2009 You need to be restarting Apache when making any changes to the php.ini Also you should leave the php.ini (and any files that come with PHP) in C:/php and add PHP to the PATH Environment Variable. You should enable a setting called display_startup_errors too within the php.ini. With this enabled PHP errors should pop up while Apache is starting up. Quote Link to comment Share on other sites More sharing options...
turtlefox Posted July 8, 2009 Author Share Posted July 8, 2009 Alright, did all that, got php working with all the files just in the php folder, but its still not reading my php.ini-development file. There is no other php.ini file.(Fixed this by changing php.ini back to php.ini-development which was its original name). I added ;C:\php to the end of the Path environment variable. Restarted comp completely, been restarting apache every time I make a change. phpinfo is still showing the inipath as C:\windows still, and changes I've made to smtp are not being reflected either. No errors on startup. Is there someplace specific I'm supposed to put PHPIniDir "C:/php"? All I've been able to find is that you need it and not that you need it anywhere specific, I see no comments within the file for a section created just for this. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 9, 2009 Share Posted July 9, 2009 PHPIniDir can placed any where in Apaches httpd.conf file. When running phpinfo and checking to see if PHP is reading a php.ini file you should look at the line labeled as Loaded Configuration File. Ignore the line above labeled as Configuration File (php.ini) Path Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.