PHP Upgrade question

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
rxsid
Forum Commoner
Posts: 82
Joined: Thu Aug 29, 2002 12:04 am

PHP Upgrade question

Post 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!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post 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.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Make sure to update any PECL extensions you might have...
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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)
rxsid
Forum Commoner
Posts: 82
Joined: Thu Aug 29, 2002 12:04 am

Post 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.
Post Reply