[Resolved] php -i and phpinfo() don't match!!!

liunx

Guest
This one is driving me crazy and I know I've done something stupid...please have mercy!

Had PHP 4.x.x running for some time and decided to upgrade to 5.0.2. Whiped everything out ini's, dll's, .php def in IIS.

Installed as ISAPI instead of CGI this time, because it sounds more more secure. Followed the instructions to a "T" several times.

C:\php is the install directory and that's where php.ini is located, Win2k with IIS. PHPRC is set up as c:\php

Anything that loads something that uses a PEAR module can't find it...it always says my include path is .;c:\php5\pear so I went through some troubleshooting and found that running php -i returns my include_path as what's in my php.ini (include_path => .;c:\php\PEAR => .;c:\php\PEAR) but phpinfo() returns this: include_path .;C:\php5\pear .;C:\php5\pear

What in the heck is going on and what have I done wrong!?!?!?

Thanks!a few points to check ..

(a) since you have upgraded from 4x to 5x, you may have multiple php.ini files found in your path .. try a full search through your disk for php.ini to see how many turn up .. keep only one

(b) try moving (not copying) php.ini to c:\windows\ ..

(c) a long shot .. similar problem reported in this thread (<!-- m --><a class="postlink" href="http://www.phpbuilder.com/board/showthread.php?s=&threadid=10284166&perpage=15&pagenumber=3">http://www.phpbuilder.com/board/showthr ... genumber=3</a><!-- m -->) turned out to be file permissions on php.ini ..Thanks for your response!

My replies are below...
(a) Yes, I did check this because it didn't make any sense. No duplicates were found.

(b) I will resort to this, if I have to. I really wanted to contain everything in one directory like the documentation suggests. It's just "cleaner", IMHO.

(c) Yeah, I looked into this too, but I'm not using NTFS on that server so there aren't any permissions to worry about, I don't believe.



Originally posted by d~l
a few points to check ..

(a) since you have upgraded from 4x to 5x, you may have multiple php.ini files found in your path .. try a full search through your disk for php.ini to see how many turn up .. keep only one

(b) try moving (not copying) php.ini to c:\windows\ ..

(c) a long shot .. similar problem reported in this thread (<!-- m --><a class="postlink" href="http://www.phpbuilder.com/board/showthread.php?s=&threadid=10284166&perpage=15&pagenumber=3">http://www.phpbuilder.com/board/showthr ... genumber=3</a><!-- m -->) turned out to be file permissions on php.ini ..read here .. same symptoms ..

<!-- m --><a class="postlink" href="http://bugs.php.net/bug.php?id=29085I">http://bugs.php.net/bug.php?id=29085I</a><!-- m --> had serious problems trying to instal PHP5.0.1 and so ended up downloading and installing wampserver instead, via <!-- w --><a class="postlink" href="http://www.wampserver.com">www.wampserver.com</a><!-- w --> :)

Easy installation and PHP, MySQL and Apache installed, though be aware that wampserver is for Win XP only; Win 98SE is not recommended.

Another bonus is that if you want to upgrade either PHP, MySQL or Apache later you can do so easily, you can even have PHP4.3.x installed at the same time :D

As with a few other add-ons which you can learn more about at the url I posted.Thanks, I may have to try the wampserver deal because I caved and cut my php.ini into my windows directory, stopped and started IIS and php -i and phpinfo() still show different things for include_path.

Crazy frustrating, but I appreciate everyone's help!same problem reported here .. read final post in this thread ..

<!-- m --><a class="postlink" href="http://www.manucorp.com/archives/php-bugs/200409/msg00709.phpLet's">http://www.manucorp.com/archives/php-bu ... 9.phpLet's</a><!-- m --> lay this one to rest. Bottom line, until the function of the executables matches what's stated in the documentation, this is going to cause some folks some pain.

Thank you all, especially d~l for your help and guidance. I did read that last thread that you posted, but that was AFTER I simply stopped my server, renamed the php directory to php5, changed all environment variables to reference the new directory, same with references in php.ini, and IIS settings, and rebooted.

I don't suggest this solution to anyone because if you miss one, it could cause even more pain and suffering. However, everything is working peachy now for me.

This did allow me to keep php.ini in my php5 directory which was my original intent. :D
 
Back
Top