php.ini question
Moderator: General Moderators
php.ini question
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?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
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
2. Look in your phpinfo and see which php.ini it is using and make sure it was the one you are using
Last edited by John Cartwright on Wed Jul 27, 2005 2:58 pm, edited 1 time in total.
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.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
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.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
Windows xp professionalnielsene 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.
I'm using apache 2.0.54
php version 5.0.4
hope this helps and thanks for the assistance
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
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
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
.
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
I've add the following to my httpd.conf (apache2 only)
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 
Code: Select all
PHPIniDir "e;C:/Program Files/php-5.0.4-Win32/"e;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.
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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia