Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
I probably didn't document the procedure as well as I should have, but I do have the exact compile options that I used to build v5.3.3 with. –  Ty01 Jan 4 '11 at 20:59
    
(Damn edit timelimit!)... No PECL extensions (as far as I know). There's only one PHP module that I had to compile myself: apc. I'll look into rebuilding the machine and documenting the whole process, but in the meantime I suppose I'll just take an image of the production machine, load it on a test machine and give it a shot. –  Ty01 Jan 4 '11 at 21:05

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?)

share|improve this answer
    
Yes, I'm running Linode's services, so test servers can be added and removed quite easily. Thanks for your feedback! –  Ty01 Jan 4 '11 at 21:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.