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:
<?php
phpinfo();
?>
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 :)
Copyright © Michael Dale 2004.
Page generated in 0.0044 seconds FreeBSD Powered
Background on style 5 is used from squidfingers How are we going? 3 queries
Good resource. Thanks
1: Comment by Matthom - Fri, 07 Jan 2005 23:42:49 EST
urls become clickable
[b]place text in bold[/b]
[i]place text in italics[/i]
[quote]place text in a quote[/quote]