compiling - Updating PHP to the latest version in Ubuntu 10.04 server edition

24
2014-04
  • Raymond

    Please explain to me why Ubuntu 10.04 LTS Server version don't release the latest version of PHP. The PHP version is still in version 5.3.6-13 while the updated version is already at 5.3.10. Will this harm my server's security?

    I want to update it to 5.3.10 but I don't know how to compile it properly. I am very confused in compiling php because there are so many configure options and i don't know where to start or which to choose. are there any tips on how to know what i need for the compile options?

    i'm a server beginner please explain to me in layman's terms.. thank you so much for your time

  • Answers
  • Lekensteyn

    Because LTS versions are more focused on stability, PHP is not always updated to the latest source available on http://php.net. The idea is, if no new features are introduced, there are less chances of creating (security) bugs. However, if a security issue has been discovered, patches are applied.

    The latest PHP version as of now in 10.04 Lucid is 5.3.2-1ubuntu4.14, where 11.10 Oneiric is 5.3.6-13ubuntu3.6. FYI, that is not a LTS version.

    If you have no experience with building packages in this way, I suggest you not to compile your own packages because the Ubuntu packagers certainly know better the stuff than you.

    For the configure options used, you can explore the debian/rules file which can be found in the source tree from apt-get source php5.


  • Related Question

    10.04 - How to upgrade to a specific version of PHP?
  • Ben Everard

    I have an Ubuntu 10.04 Server installation with PHP 5.3.2 installed, I want to upgrade it to PHP 5.3.5. I'm led to believe that apt-get upgrade will only install security updates, we're on this LTS release and don't plan on updating our servers until 12.04, so it's pretty important for us to be able to update PHP.

    Any ideas?

    Many thanks.


  • Related Answers
  • Octavian Damiean

    Then you'll most likely have to build from source. Head to http://php.net, download the sources and build your PHP version.

  • Lekensteyn

    If you want to keep current with the latest upstream version, you should compile PHP from source. That allows you to tweak your installation even more, take time for reading through the extensions page for customizing PHP. Running ./configure --help in the source folder shows you a list of options too.

    When compiling from source, it's strongly recommended to subscribe to the PHP announcements mailing list. Go to http://php.net/mailing-lists.php, check the radio button "Normal" at Announcements, fill your email address in the bottom form and press "Subscribe".

  • luri

    You could try the ppa listed here: https://launchpad.net/~nginx/+archive/php5?field.series_filter=lucid

    It points to ppa:nginx/php5

    I haven't tried it, tho..

  • conner_bw

    I installed Zend Server Community edition to get an updated version of PHP.

    http://www.zend.com/en/products/server-ce/downloads

    To me, this is a relatively easy way to keep PHP up to date. Not the latest and greatest, but Zend will eventually catch up IMHO.

    The most important steps, for me, was making sure that all the unwanted parts didn't launch when the server rebooted. The Zend Server daemons are controlled via: /usr/local/zend/bin/zendctl.sh which is symlinked to /etc/init.d/zend-server. These can be turned on/off using a variation of update-rc.d zend-server defaults

    PS: If you try this, make sure you type "CE" for "Community edition" during apt-get install, otherwise it's not free (as in beer).

  • hexafraction

    Just install it from the source. There is not expected release data for the next version in the repository.

  • James Bennet

    Security patches will be back ported. Features will not. This the entire point of LTS. Your alternative is to build from source.