Bluetrait

Loading
search


Posts:
Comments:

Popular posts

Click here if you are looking for Bluetrait, the weblog software.

Login:

Username:

Password:

upgrading php

Posted by Michael Dale on Thu, 06 Jan 2005 12:42 PM

Upgrading PHP.

In the last few weeks I’ve done many upgrades of PHP on different operating systems. Windows 2003, Linux Redhat 7.1, FreeBSD 4.10 and Mac OS X 10.3.

The process for the *nix systems is all pretty similar; so I thought I write down how I upgrade these operating systems.

Please note I assume php is already installed on the system.

First find out what compile options your version of php is running with. The way I do this is through a simple built in php function.

Create a php file on the server with the following inside:

When you load up the page in a web browser you should see near the top something called: Configure Command.

Next to this will be something like (taken from my Mac OS X box):

'./configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc'

This is the configuration options php was installed with. Head over to php.net and download the latest version of php. I still recommend php4 for production stuff.

Then run the following commands on the file.

gunzip phpfilename.tar.gz
tar -xvf phpfilename.tar

then CD to the new folder made and run ./configure with the options you found above.

Then MAKE, and then MAKE INSTALL.

Stop Apache and Start it again. Everything should be happy jan.

Please note this is just for upgrading from 4.3.x to a newer 4.3.x if you’re doing bigger jumps you may need to change the php.ini file and also maybe where apache loads the php modules from.

Enjoy your up to date versions of php :)

On Fri, 07 Jan 2005 at 11:42 PM, Matthom wrote:

Good resource. Thanks