Upgrade PHP v5.3.3 to v5.3.4

I currently have PHP v5.3.3 installed and configured. Everything is working perfectly, but I would like to keep PHP up to date and upgrade to v5.3.4. Can someone please describe the usual upgrade process for PHP when compiling manually?

For example: is it just as easy as downloading the newest source, uncompressing it, compiling it using the same (or comparable) options that were used on the last version?

Is there anything that has to be removed or changed from the previous version installed?

I'm clueless. Please help!

Edit:

I think the general consensus is back-up, try it on a test server, and document everything. Thanks for all your feedback!


Solution 1:

is it just as easy as downloading the newest source, uncompressing it, compiling it using the same (or comparable) options that were used on the last version?

That may work. Did you document the procedure? Have you built any PECL extensions, or compiled any other PHP modules, you may need to rebuild those.

Have you read the PHP changelog and upgrading notes to see if the is any notes from upstream that you should be aware of?

If you don't have good documentation about how you got the current version built/installed and what other changes you have made to the system then you really can't know for certain.

Just try building on a test machine, and test your applications. If everything works then that is what you needed to do.

If you don't have a test environment/VM, then build that first. If you don't have a backup system in place to revert your setup, if/when the upgrade on the production system fails, then setup that up right now. If you don't have documentation about how it was built the last time, then write it.

Is there anything that has to be removed or changed from the previous version installed?

Maybe, it depends a lot on what you did in the past.

Compiling on your own while clueless is a bad idea in my opinion. Are you subscribed to all the security lists? Do you have a strong reason why you aren't using a packaged version?

Have you considered using the package management tools on your system and building a local package? Building a local package is a good ideal.

  • This is a form of documentation, since the control files can be put in a VCS.
  • You will have a you a repeatable install, so you can test the exact same thing on your testing/dev/production boxes

If you don't want to figure out how to use the package tools for your OS, at least consider writing a script to perform the compile/install. That script will your documentation, and the one true source for the install procedure.

Solution 2:

First step: read the release notes. That'll tell you any major changes you absolutely must be aware of. For instance, note the follow_location option for http streams and the new parameter added to get_html_translation_table.

Second step: read the changelog. Search it for functions and modules you use, especially look at the fixed buglist. That'll tell you if there were any little changes that may impact you but that the developers didn't think needed to be front page news.

As for the rest, back up your current php files (I think php.ini files, PHP modules,cgi executables and/or mod_php5.so should cover everything) then compile and install (document what files are created by make install so you can see what files you need to back up next time). If things don't work, you can put the backed-up php files back (you ARE going to test this on a test server, right?)