php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20540 PHP do not read PHP.INI
Submitted: 2002-11-21 04:45 UTC Modified: 2002-12-13 11:49 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: JeanFrederic at Loiseau dot org Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.2.0 OS: Windows XP Pro
Private report: No CVE-ID: None
 [2002-11-21 04:45 UTC] JeanFrederic at Loiseau dot org
Hello,

I've put PHP.ini in C:\WINXP as requested, but when I modify it (for exemple changing the SMTP server info), phpinfo() do NOT get the changes...

I verified again and again, php.ini is correct with the changes, but the SMTP value is still the default value "localhost"...

I've check, I have no other php.ini on my machine...

I even suppress php.ini, but phpinfo() do not really care it seems... taking always default values.

Thanks in advance for your help

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-21 11:50 UTC] philip@php.net
Do this:

a) load phpinfo();
b) It will tell you where your php.ini is or where it's looking for it.  It will include the path and filename so: c:\foo\php.ini  
c) Not that (b) will not just be a path, it will include the filename too.  Please confirm this.  If just a path shows, put your php.ini in this directory.
d) Edit this php.ini.  If you are running php as a module, restart web server.
e) For kicks, try changing some more common directives, such as register_globals

Also, name it php.ini not PHP.ini although on windows this shouldn't matter but... 
 [2002-11-21 12:20 UTC] JeanFrederic at Loiseau dot org
Thanks a lot for your fast reply...

But, I knew of course that phpinfo() shows the path... and the displayed path by phpinfo() is "c:\winxp\php.ini"

This is where I put the php.ini, but whatever I'm modifying in it and even restarting Apache, it does not take the changes into account !!!! I do not understand why...

Anyway I'm using a workaround until finding the reason based on ini_set() function... I have to harcode it in the source code, but it works...

Please, if you have any idea tell me... I hate to not understand when I'm doing all what is requested :-)

Regards,

Jean-Frederic
 [2002-11-21 16:41 UTC] iliaa@php.net
You are using a relatively dated PHP, upgrading to 4.2.3 or better yet stable snapshot (avaliable from http://snaps.php.net) may solve your problem.
 [2002-12-01 16:48 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2002-12-01 18:56 UTC] bill at softky dot com
I've got an identical problem on php 4.2.3 (submitted as a new bug #20753) to make sure it returns to "open" status.
 [2002-12-12 20:01 UTC] olesoft at hotmail dot com
i am having the exact problem with my php.ini settings under winxp pro w/iis ...

the ini_set function does work to fix it but i really dont feel like editing all the configs for things like phpbb, phorm, my own scripts and such itts just oo much of a hassle...

any other suggestions would be greatly appreciated.

I am confident you guys will find the solution to this bug eventually.

 thanks Andrew.
 [2002-12-13 02:33 UTC] JeanFrederic at Loiseau dot org
Hi Guys,

I'm happy to see I'm not alone, and too much stupid :-)

I found 2 workarounds that can work for you (I hope)

1) With Apache : I put php.ini in Apache Directory, I've deleted the one in ../system32/
I don't know why but... it worked...

2) Other solution : I have installed the Php version 4.3 RC0

These 2 solutions worked fine for me, hope this will help you as well

Sincerely,

Jean-Frederic
 [2002-12-13 11:49 UTC] philip@php.net
This really is bogus, please read the findings found at:

http://bugs.php.net/bug.php?id=20753

It has to do with your windows settings, not PHP.  If another person can confirm the findings in #20753 then this windows feature/bug will be documented as a <note>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 09:01:29 2024 UTC