PHP4 vs PHP5 on the server

I run a Windows 2003 Web server, on which we have 3 clients who have PHP sites. We’ve been running PHP 4.3.10 for a while now without problems. However, we’ve got a WordPress blog that is driving me nuts with random shutdowns and errors (it’s not even a very big blog) and since I can’t trace the problem to a MySQL issue, I think my next logical step is to upgrade PHP.

4.4.7 is the latest PHP4 version, but PHP5 is also an option. Since I’m not a PHP coder, I am not quite sure what the difference would be to the PHP sites on the server. I’ve Googled it and most of the things I find are either old forum posts (6 months or more) or people not making arguments for or against the switch, just linking to the PHP5 faq.

I’ve sent emails to the PHP webmasters we host, just to ask if their code will be compatible with PHP5, and I won’t go to 5 if they say there will be problems. But if they say it’s ok…should I go to 5 or just upgrade 4?

Anyone have any experience upgrading on a Windows 2003 server? I’ve read the FAQs and am pretty sure I can get it done - just want to make sure it should be done at all.

I run a small web hosting business, and had to deal with this same issue. I do remember having some small issues porting from PHP4 to PHP5. Particularly with getting all of the necessary modules compiled…but it all worked out ok. Truthfully I had more trouble going from MySQL 4 to MySQL 5 (so much so that I’m actually running both versions of MySQL on different ports).

I recommend downloading WAMP or XAMPP with PHP 5, in order to see if your web sites work the way you expect before you make the big leap.

Personally, as a developer I prefer PHP 5, if that means anything.

Sorry I don’t have more specifics. I’ll see if I can look back on my notes if I get some free time later.

Thanks for your input. Good to know about the problems with MySQL 5, too. Now I know why my partner (who set this up) decided to stick with 4.1 :slight_smile:

I forgot to mention, I run it on IIS 6 not apache. I looked at those 2 apps you linked to and I don’t think I’d need them. I might do a reinstall of phpMyAdmin, tho, because one of our web users installed it and every time he logs in, it crashes MySQL (that’s not the only time MySQL crashes, though).

Let me know if you find your notes - that’d be helpful (IF you’re installing on IIS 6). I have been reading a lot of install fixes and tricks on the various PHP sites and they seem helpful so far too.

One problem I had with MySQL 5 is that by default it uses a different method to store your MySQL User passwords. So, after upgrading, no-one could log in. But, you can set the option “old_passwords=1” in your my.cnf file and it will use the old password mechanism, and avoid that problem.

WAMP and XAMPP wouldn’t be a permanent solution…just a development environment, really, so that you can test compatibility of your web pages. You can install one of those packages on your home PC, start it up, see if your apps work on PHP5, then shut it down. It shouldn’t matter that it’s Apache as opposed to IIS if you’re just testing PHP functionality.

Good luck!