Upgrade Guide for PHP and MySQL

Quite honestly, I hate using 3rd party RPM Repositories. The chance of things getting screwed up or being incompatible at a later date is quite high. Unless I build packages from sources, I tend to stick to the CentOS and InterWorx repos only.

My current solution at this point for getting users on PHP 5 has been moving them onto a CentOS 5 machine running PHP 5. With the EOL of PHP coming up in a few weeks it would be very nice if the InterWorx team would release PHP 5 rpms for CentOS 4 users. This would save quite a few users the trouble of using third party repos, or building packages themselves for deployment.

The thing that I like about CentOS 5, however, is the fact that the InterWorx developers rely more on upstream packages for php/mysql/etc. However, the current situation going on with CentOS 4 with PHP 4 reaching EOL is quite annoying for the majority of the folks in this community, I’m sure.

Just my 2 cents.

I believe CentOS 4 rpms from remi’s repo are compatible with all versions of centos 4.

I’m running CentOS5 and I was trying to up PHP to 5.2. I followed the directions, but it’s just not letting me upgrade or install (either way).

Transaction Check Error:
file /etc/php.ini from install of php-5.2.5-100.rhe5x.iworx conflicts with file from package php-common-5.1.6-15.el5
file /usr/bin/php from install of php-5.2.5-100.rhe5x.iworx conflicts with file from package php-cli-5.1.6-15.el5
file /usr/bin/php-cgi from install of php-5.2.5-100.rhe5x.iworx conflicts with file from package php-cli-5.1.6-15.el5
file /usr/share/man/man1/php.1.gz from install of php-5.2.5-100.rhe5x.iworx conflicts with file from package php-cli-5.1.6-15.el5

Any suggestions on how to get around this?

Thanks!

edit, nevermind

rpmbuild --rebuild http://mirror.steadfast.net/misc/iworx/mysql-5.0.51a-100.iworx.src.rpm --with rhe4x

RPM build errors:
File not found: /var/tmp/mysql-5.0.51a-root/usr/lib/mysql/libz.a
File not found: /var/tmp/mysql-5.0.51a-root/usr/lib/mysql/libz.la

I am a Steadfast customer running CentOS 4.6

[quote=CrazyTech;14996]I’m running CentOS5 and I was trying to up PHP to 5.2. I followed the directions, but it’s just not letting me upgrade or install (either way).

Any suggestions on how to get around this?

Thanks![/quote]

You have a few options:

  1. remove the PHP packages that are there and then install the new packages

  2. ā€œforceā€ the install over the old packages (not recommended)

The cleanest way is #1 but you may find that centos isn’t happy with the new RPMs as I’m not sure how much they’ve been used on centos5 since it ships with php5. An ā€œeasierā€ method may just be to grab the centos SRPMs for php5 and then just drop the new 5.2.5 source in there and recompile. This would stay within the boundaries more than likely. Note, doing this method often requires some SPEC file tweaking.

Chris

[quote=sliqua;14840]Quite honestly, I hate using 3rd party RPM Repositories. The chance of things getting screwed up or being incompatible at a later date is quite high. Unless I build packages from sources, I tend to stick to the CentOS and InterWorx repos only.
[/quote]

This is sound advice. The more you can rely on just the CentOS repos the better off you are for compatibility long-term. Obviously there are iworx RPMs that are provided but as in the case of using php5 on CentOS 5 I’d use the CentOS 5 SRPMS and make your own php5 RPMS before making ours work.

Chris

Thanks Christ, but uninstalling PHP was what I tried. My server would confirm that no PHP package was installed, but I’d still get that error when I tried to install tthe PHP 5.2.5 rpms that were given in this thread. I’m still trying to wean my way off of cPanel and Plesk, so I guess I’ll just have to stick with the current PHP version and wait for an update.

Hi,

Whats wrong whit this php upgrade?

/bin/sh /usr/src/redhat/BUILD/php-5.2.5/build-cgi/libtool --silent --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/main -I/usr/src/redhat/BUILD/php-5.2.5 -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/date/lib -I/usr/src/redhat/BUILD/php-5.2.5/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/ncurses -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/Zend -I/usr/src/redhat/BUILD/php-5.2.5/main -I/usr/src/redhat/BUILD/php-5.2.5/Zend -I/usr/src/redhat/BUILD/php-5.2.5/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ -I/usr/include -O2 -g -fomit-frame-pointer -fPIC -o ext/mhash/mhash.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/redhat/BUILD/php-5.2.5/build-cgi/modules -L/usr/kerberos/lib64 -L/usr/lib64/mysql ext/mhash/mhash.lo -lmhash
/bin/sh /usr/src/redhat/BUILD/php-5.2.5/build-cgi/libtool --silent --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/main -I/usr/src/redhat/BUILD/php-5.2.5 -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/date/lib -I/usr/src/redhat/BUILD/php-5.2.5/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/ncurses -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/Zend -I/usr/src/redhat/BUILD/php-5.2.5/main -I/usr/src/redhat/BUILD/php-5.2.5/Zend -I/usr/src/redhat/BUILD/php-5.2.5/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ -I/usr/include -O2 -g -fomit-frame-pointer -fPIC -o ext/mysql/mysql.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/redhat/BUILD/php-5.2.5/build-cgi/modules -L/usr/kerberos/lib64 -L/usr/lib64/mysql ext/mysql/php_mysql.lo -lmysqlclient
/bin/sh /usr/src/redhat/BUILD/php-5.2.5/build-cgi/libtool --silent --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/main -I/usr/src/redhat/BUILD/php-5.2.5 -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/date/lib -I/usr/src/redhat/BUILD/php-5.2.5/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/oniguruma -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl -I/usr/src/redhat/BUILD/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/ncurses -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/Zend -I/usr/src/redhat/BUILD/php-5.2.5/main -I/usr/src/redhat/BUILD/php-5.2.5/Zend -I/usr/src/redhat/BUILD/php-5.2.5/TSRM -I/usr/src/redhat/BUILD/php-5.2.5/build-cgi/ -I/usr/include -O2 -g -fomit-frame-pointer -fPIC -o ext/ncurses/ncurses.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/redhat/BUILD/php-5.2.5/build-cgi/modules -L/usr/kerberos/lib64 -L/usr/lib64/mysql ext/ncurses/ncurses.lo ext/ncurses/ncurses_fe.lo ext/ncurses/ncurses_functions.lo -lpanel -lncurses
/usr/bin/ld: /usr/lib64/mysql/libmysqlclient.a(libmysql.o): relocation R_X86_64_32 against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
/usr/lib64/mysql/libmysqlclient.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [ext/mysql/mysql.la] Error 1
make: *** Waiting for unfinished jobs…
error: Bad exit status from /var/tmp/rpm-tmp.87091 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.87091 (%build)

how can I fix it?

Thanks

Hi every one ,
Is ther any other option to upgrade to php 5.2.x with cent os5x64

hubbadubba,

what instructions thit you use to configure yum wint Cent os 5 x64, whas it this :

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

thanks in advanced

The latest Steadfast upgrade to php 5.2.9 was causing a problem for me. Apache died and gave me the message ā€œhttpd dead but subsys lockedā€ whenever I would check the status. I’ve since gone back to php 5.2.6 and removed the iworx-php-release-5.2-2.steadfast.noarch.rpm. Any ideas as to why this would cause the problems with Apache? I need php 5.2 for roundcube.