Page 1 of 2

php.ini question

Posted: Wed Jul 27, 2005 2:37 pm
by nawhaley
I have a issue thats been annoying me to no end and perhaps someone here may have the answer. I just got done making some modifications to my php.ini file and ran phpinfo() to make sure apache was seeing the modifications that I had made. Now I know for a fact I am modifying the correct .ini since I looked at the phpinfo() file to find out which directory it was pulling the ini file from yet it does not reflect ANY changes to the ini when I run phpinfo(). does this command pull from the php.ini file for its information or not? Should I mostly ignore it for configuration purposes and simply use it for testing purposes?

Posted: Wed Jul 27, 2005 2:40 pm
by John Cartwright
1. Have you restarted Apache?
2. Look in your phpinfo and see which php.ini it is using and make sure it was the one you are using

Posted: Wed Jul 27, 2005 2:40 pm
by nielsene
Under most situations you'll need to restart the web server for the changes to take effect. If you're running apache on *nix, "sudo apachectl restart"

Posted: Wed Jul 27, 2005 2:46 pm
by nawhaley
yes I'm shutting down the apache server and bringing it back up and it still does not show the change. This has to be the most "frustrating" thing in the world. I know I'm making the changes, I know I'm saving the file because I'm double checking it and I know I'm shutting down the server because I'm even going into task manager to make sure a rogue instance of it isnt hung up somewhere and still nothing :(. I really need some help with this its set development back days because I cant get sessions to work due to the fact it will "not" accept modifications to the ini.

Posted: Wed Jul 27, 2005 2:57 pm
by timvw
Are you sure apache is using the ini file you think it is?

phpinfo();

Configuration File (php.ini) Path /etc/php4/php.ini

Posted: Wed Jul 27, 2005 2:57 pm
by John Cartwright
I repeat myself:

Are you sure you are editing the correct php.ini?
Look in your phpinfo to check which one it is reading

Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini

Edit| Dang Tim ya beat me

Posted: Wed Jul 27, 2005 3:04 pm
by nawhaley
Jcart wrote:I repeat myself:

Are you sure you are editing the correct php.ini?
Look in your phpinfo to check which one it is reading

Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini

Edit| Dang Tim ya beat me
yes I am 100% certain I am modifying the proper php.ini file and yes I am 100% positive I am shutting down the apache server and bringing it back up. in my phpinfo() it says C:\Windows. I'm then going under C:\Windows and altering the php.ini file from there and no where else. Now is there any other reason it may not reflect the modifications made in the "right" file.

Posted: Wed Jul 27, 2005 3:04 pm
by nielsene
What OS? I once had a very similar problem, on Debian Linux where some subtle differences between configurations caused things to report the wrong php.ini location on the phpinfo() page.

Posted: Wed Jul 27, 2005 3:05 pm
by nawhaley
nielsene wrote:What OS? I once had a very similar problem, on Debian Linux where some subtle differences between configurations caused things to report the wrong php.ini location on the phpinfo() page.
Windows xp professional

I'm using apache 2.0.54

php version 5.0.4

hope this helps and thanks for the assistance :).

Posted: Wed Jul 27, 2005 3:12 pm
by nielsene
I'm trying to remember what the situation was ...

A few "out there" ideas, (I doubt any of these are it, but just in casw)
1. do you have a .htaccess file with lots of php_value directives overriding the php_ini

2. Check the httpd.conf, I think there was a way to specify an alternate one there that can override some things.

3. Check the php.ini, see if the there are second definitions of the changed values after the ones you were changing, etc

Posted: Wed Jul 27, 2005 3:26 pm
by nawhaley
You will have to pardon my ignorance but on the topic of htaccess files I havent configured a single one of these so whatever is in them by default is whats there. I did find an override for what directives can be placed in htaccess files but its currently set to none. Should I have made some changes to a .htaccess file when I configured my php and if so how do I view them to make the necessary changes?

Also as far as I can tell nothing is making any further modifications to the values I changed in the php.ini file. I specifically changed the assigned session ID from phpsessid to phpsessid1 for testing purposes and also removed the ; from save_session_path and assigned it a valid windows directory path.

P.S. Pardon me if I dont respond again till tommorrow morning its near the end of my work shift and I try not to think about this rather irritating problem at home :).

Posted: Wed Jul 27, 2005 3:42 pm
by timvw
I've add the following to my httpd.conf (apache2 only)

Code: Select all

PHPIniDir &quote;C:/Program Files/php-5.0.4-Win32/&quote;
But i believe the INSTALL.TXT says you can also use the PHP5RC environment variable or a php.ini that is in the system path.. Anyway, the above approach is the one i prefer ;)

Posted: Thu Jul 28, 2005 7:52 am
by nawhaley
so bascially your telling it to look for the php.ini fle in your main php directory instead of the windows directory with that line if I'm reading it right. How is that helping the overall fact that any modifications made to the ini itself are being ignored by phpinfo()? I still think there is an underlying piece to my installation thats missing thats making this crop up like this.

Posted: Thu Jul 28, 2005 8:59 am
by nawhaley
I'm going to shamelessly bump this because I "can't" be the only person who has run into an issue like this someone has to have run into a problem configuring this ini file like I have. I mean if you couldnt configure this in a simple manner the whole language would be totally useless and its to widely used for that.

Posted: Thu Jul 28, 2005 9:03 am
by Chris Corbyn
How is PHP5 being used in httpd.conf...

Are you just using it as an interp[reter by manually associting php.exe with .php files OR are you loading mod_php5.dll (or whatever it's called)?

I think you need to do the latter in order to use that directive ;)