LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2006, 02:11 PM   #1
trewsfan
LQ Newbie
 
Registered: Jul 2005
Posts: 13

Rep: Reputation: 0
Please help me upgrade PHP from 4.2.2 to 5.1.6


Hey Everybody,

I need some advice on upgrading my database server. The current version of PHP I'm using is 4.2.2 because that's what came with the install disks, but there's some XML functions in PHP 5 that I want to use.

The server is made of PostgreSQL, PHP and Apache, and here's the details about package versions:

Hardware:
Intel Celeron 1.70 GHz
512 MB Ram

Software:
[root@krakatoa httpd]# cat /proc/version
Linux version 2.4.20-9 (bhcompile@stripples.devel.redhat.com) (gcc version 3.2.2 20030313 (Red Hat Linux 3.2.2-10)) #1 Wed Apr 2 13:42:50 EST 2000

[root@krakatoa httpd]# rpm -qa | grep sql
postgresql-libs-7.3.2-3
postgresql-devel-7.3.2-3
mysql-server-3.23.56-1.9
php-mysql-4.2.2-17
mod_auth_pgsql-0.9.12-14
postgresql-tcl-7.3.2-3
libdbi-dbd-mysql-0.6.5-5
postgresql-docs-7.3.2-3
libdbi-dbd-pgsql-0.6.5-5
postgresql-7.3.2-3
postgresql-python-7.3.2-3
postgresql-pl-7.3.2-3
mysql-3.23.56-1.9
php-pgsql-4.2.2-17
postgresql-odbc-7.2.5-1
postgresql-server-7.3.2-3
mysql-devel-3.23.56-1.9
postgresql72-libs-1-3
mod_auth_mysql-1.11-12
postgresql-jdbc-7.3.2-3
postgresql-contrib-7.3.2-3
postgresql-test-7.3.2-3

[root@krakatoa httpd]# rpm -qa | grep httpd
redhat-config-httpd-1.0.1-18
httpd-2.0.40-21.1
httpd-manual-2.0.40-21.1
httpd-devel-2.0.40-21.1

[root@krakatoa httpd]# rpm -qa | grep php
php-ldap-4.2.2-17
php-mysql-4.2.2-17
php-4.2.2-17
asp2php-gtk-0.76.2-5
php-manual-4.2.2-17
asp2php-0.76.2-5
php-devel-4.2.2-17
php-pgsql-4.2.2-17
php-odbc-4.2.2-17
php-snmp-4.2.2-17
php-imap-4.2.2-17


I'm not sure how to upgrade to PHP 5 or better, I'm thinking of doing something like this:

1. Download the newest PHP 5.1.6 source
2. Unpack it, configure, make, make install
3. Change my httpd.conf file from "LoadModule php4_module modules/libphp4.so" to "LoadModule php5_module modules/libphp5.so"

If I did this, I'd expect to have both PHP 4.2.2 and PHP 5.1.6 on my server. Then if the PHP 5 causes some unexpected problems with my existing code, I could go back to using the PHP 4.2.2 by editing the httpd.conf file to load the libphp4.so module instead. But, is it a bad idea to have both PHP 4.2.2 and PHP 5.1.6 on the same machine?

Has anyone done something like this and can give some advice?

Thanks.
 
Old 09-13-2006, 01:01 AM   #2
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
Start here:

http://www.php.net/manual/en/faq.migration5.php
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP upgrade from v. 4.0.4 to v. 5 sergiodlc SUSE / openSUSE 3 01-31-2006 03:22 AM
PHP Upgrade z_darius Mandriva 3 03-29-2005 07:10 AM
Upgrade PHP objorkum Slackware 5 03-25-2005 01:14 PM
PHP upgrade Damiand Linux - Newbie 0 06-07-2004 06:31 PM
Upgrade php 4.2.x to 4.3.x buzzbuzz Linux - Newbie 0 10-30-2003 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration