Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How to upgrade PHP 5 on Windows?

    Amazing that I haven't been able to find anything Googling this... seems like a common operation...

    What is the recommended procedure for upgrading PHP 5 on a Windows (Server 2003 / IIS 6) box?

    I imagine simply: stopping IIS services, moving/renaming the current /PHP directory, creating a new one with the latest version of PHP, and restarting IIS -- this should do the trick.

    But I'm a stickler for best practices, and avoiding any unintentional pitfalls.
    Going from PHP 5.1.2 to 5.2.6.

    Advice?


    Thanks,
    --RHYNO

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Thats how I'd do it. Its been awhile since I configured IIS and don't recall how you change PHP's directory, but I'd just add a new directory and change the pointer to it.
    One thing I'd suggest is separating you're ext directory so that different PHP versions can share the same extensions.
    For you're minor version change, honestly I'd just overwrite the original. On the other hand, I've worked with PHP a long time, so if something goes wrong I can easily fix it. Easier said than done if you're not familiar with PHP configurations. So instead, I'd just make a /php directory (where / can really be anywhere of you're choosing) and then add php-5.1.6, php-5.2.4, etc as subdirectories below it. Makes it easy to find and switch in case you want temporary upgrades for testing.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Regular Coder hinch's Avatar
    Join Date
    Sep 2005
    Location
    UK
    Posts
    923
    Thanks
    25
    Thanked 80 Times in 80 Posts
    if i remember correctly its not even the entire php directory you need to upgrade its just the php.dll (forget its exact name) since for most windows systems php is compiled to a dll which is then registered and called by IIS as far as I remember it doesn't use the php.exe at all when doing web based requests.
    (though I could be wrong its been a long time since I've used php and IIS)
    A programmer is just a tool which converts caffeine into code

    My work: http://www.fcsoftware.co.uk && http://www.firstcontactcrm.com
    My hobby: http://www.angel-computers.co.uk
    My life: http://www.furious-angels.com

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    No I think you're right.
    I don't really pay too much attention to this either, but I seem to recall upgrading a minor version by swapping one of my PHP4 dlls. I don't recall for certain, but I think it was php4apache2.dll. This is used on a Windows XP machine configured with an Apache client.
    If this is the case, its just a matter of identifying which one is used for IIS (I don't know for certain).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    2,961
    Thanks
    2
    Thanked 305 Times in 297 Posts
    All the main and extension .dll files must be the same version to avoid runtime errors when they don't match up because they will have been complied with different C header files.

    php5ts.dll is the main php language engine. Most of other .dll files in the main folder are simply interfaces to the main engine for different servers - cgi, sapi, apache...

    Either replace all the files or none of them.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #6
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey,

    It would be worth checking out FastCGI for IIS 6 while you're upgrading to 5.2.6. You can find details about using FastCGI on IIS 6 to host PHP applications here. Worth noting that the 5.2.6 has a stack of improvements so that PHP runs a lot better on Windows than previously.

    You may want to also look at upgrading to WS2008/IIS 7 as the new functionality in combination with the improved PHP support makes it a lot easier to host PHP applications. IIS.net has a whole section on this.

  • #7
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Upgrading to PHP 5.3.2 on Windows 2003 with IIS6

    I am upgrading from PHP 5.2.5 to PHP 5.3.2. on a Windows 2003 server, running IIS6. I would also like best practices and procedures for upgrading, as opposed to doing a fresh install. I have downloaded and extracted the new version of PHP, and placed the folder in the root of the server. I've backed up the old php.ini and PHP525 folder.

    I can proceed as if I'm installing PHP for the first time...configuring IIS and the php.ini etc, but would like to follow best practices from someone who has done it successfully before me. Also what do I do with the old PHP folder? How can it be removed successfully? When adding PHP to the path, ie Environment Variables in MyComputer/Advanced...I know I'd add the current path to my PHP532 folder. Do I delete the other?

    I know I have to configure IIS in Web service extensions. I already have .PHP entered as an extension, but I'm sure I must have to update the path the to new PHP5ISAPI.DLL, if that's what it's called in the new version, no?

    Then in IIS, the Websites directory...In a new installation, I'm directed to add an Application Extension in the Home Directory...and again put the path to the PHP5ISAPI.DLL. Am I adding a new extension...probably just overwriting what's there, now?

    And what about the php.ini? What, if anything should be configured differently between 5.2.5 and 5.3.2? The old tutorial I found doesn't even mention configuring php.ini. And I certainly did when installing 5.2.5. I do have it living in the Windows directory. Any thoughts on that?

    And in reference to using MySQL, this post in an old installation tutorial refers to libmysql.dll....IN the PHP5.3.2 folder there isn't even any file like this at all?

    "If you are going to use MySQL you will need to make sure to uncomment the line “extension=php_mysql.dll” in php.ini and copy C:\PHP\LIBMYSQL.DLL to C:\WINDOWS\SYSTEM32 (Simply setting the PATH won’t work as this is apparently hard coded in PHP5). If you don’t follow these steps you will get an error message similar to this: “Call to undefined function mysql_connect”. "

    So, some updated best practices would be totally appreciated. I am sort of stuck with the IIS6 and Windows 2003, but need to upgrade my PHP to this newer version.

    Thanks for any assistance anyone might be able to give me! WCW

  • #8
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,093
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Personally I'd just download and install the uniformwebserver. Works straight out of the box if your on an NT based system.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #9
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, that's not really the question, is it? I'm using IIS, and that's the situation I'm asking about. And I'm not using any PHP code, so I don't really understand your comment about bracketing PHP code.

    I hope that someone else is willing to address my questions. Thanks. WCW

  • #10
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My apologies for bumping this old thread, but I really need some info on this topic. Should I start another thread? But then this one's already bumped. Sorry.

  • #11
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,093
    Thanks
    51
    Thanked 506 Times in 493 Posts
    The problem you face is that few people use IIS and php. Sure there are some people but you'll find the large majority of IIS systems are probably VPS's/ dedicated servers which already have it pre-setup by the data centre.

    Thats why I made my recommendation. Sorry you felt that having the latest version running within minutes was a better idea.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #12
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    There is quite a bit of information in the PHP manual about migrating between the various versions.

  • #13
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a friend showed me to just download a AMP stack? well anyhow im using XAMP now and i believe it is 5


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •