Page 1 of 1

PHP Upgrade question

Posted: Thu May 11, 2006 7:10 pm
by rxsid
Hi all,

I've running Apache 2.0.52 on a windows 2003 server, currently with PHP v 4.3.10 installed. I'm looking to upgrade to PHP v4.4.2 in order to attempt to resolve an issue with not being able to instantiate a COM object to work with Excel files.

My question is, what is the best way to upgrade PHP in this type of environment? Just delete all the current PHP files/folders and proceed with the installation of the new PHP version (which is the non-installer version)?

Thanks!

Posted: Thu May 11, 2006 7:23 pm
by RobertGonzalez
If you can use the Windows uninstall feature, I would think that would be a good way to go to get the old version off your system. Then do what you will to get the new one on. Another thing you can do is just install the new version. I have PHP 4 and PHP 5 on my Windows development machine right now. I tell it which to use by changing a registry setting (or in Zend Studio, you can tell it to use PHP4 or PHP5).

PS I'm not expert at this. I am just kinda talking out loud here.

Posted: Thu May 11, 2006 10:52 pm
by Burrito
are you using isapi or cgi?

if the former, just d/l the new verision, put it the isapi dll file in your php folder and change the apache directive to use the new dll (I think it's LoadModule but I'm shooting from there hip there).

if the latter, then I think all you'll need to do is copy the new php.exe file into your php folder.

in either case, I'd update your php.ini file in your %systemroot% folder.

Posted: Fri May 12, 2006 3:24 am
by Maugrim_The_Reaper
On Windows you can just backup your current PHP version, download the (non-installer) binary and put in the same location, copy any required dll's as needed (see how backed up version was organised - sometimes a dll or two gets copied to the main PHP dir, or Apache bin dir so its easier to locate for them), check you previous php.ini against the new version (they're probably interchangeable bu safer than sorry), check the httpd.conf configuration file for Apache that all PHP/sapi paths are still correct -then test run Apache and use it.

Posted: Fri May 12, 2006 3:25 am
by Maugrim_The_Reaper
Make sure to update any PECL extensions you might have...

Posted: Fri May 12, 2006 10:17 am
by timvw
WIN2003/IIS6 consuming COM via PHP:
I can only suggest to have a look at the error log (and windows event viewer) since i've got the feeling that it's a permissions problem... (For debugging purposes you could simply try to run the IIS instance with an Administrator account and see if the problem still exists)

Posted: Fri May 12, 2006 11:15 am
by rxsid
All,

Thanks for the reply's! Maugrim, I wound up doing basically what you suggested. I made a backup of the previously current installation of PHP (v 4.3.10), then deleted everything out of the \php installation directory. I then downloaded the new version (non msi installer version), unzipped it and moved a few required .dll's into the \php directory. I verified the php ini file as well as the apache httpd.conf file. This seems to have worked just fine as php works as before.

On a side note, it appears that this PHP upgrade resolved my Excel COM issues as I'm now able to resume using my php scripts that open/create/modify Excel spreadsheets. Not sure why, but apparently v4.3.10 has issues with Excel 2003 (perhaps with all of office 2003), and v4.4.2 does not.
So if anyone is encountering problems with COM and office 2003 products, you might consider upgrading to PHP v4.4.2 if your not on it already.