Link to home
Start Free TrialLog in
Avatar of bxglxbxglx2000
bxglxbxglx2000

asked on

How to install/update php 5.3 on RedHat 64 bit?

I found sollution here, for 32 bit
https://www.experts-exchange.com/questions/24947235/CentOS-PHP-and-Mysql-upgrade.html#discussion

But now I want to install on My server - Centos 5.4 , 64 bit

Please help me compile PHP 5.3

Thank you in advanced!
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Check this page.  It has some Red Hat notes that may be helpful:
http://us.php.net/manual/en/install.unix.php
Avatar of bxglxbxglx2000
bxglxbxglx2000

ASKER

I installed default apache of Centos 5.4 - x64
If I need reinstall Apache from source ?
Then also Install PHP from source?
(it really complex for me)
I following the guide, compile well, make well, install well, and: php -v show version 5.3
- But when I restart apache, it has error:
Starting httpd: httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/libphp5.so into server: /usr/lib64/httpd/modules/libphp5.so: undefined symbol: zend_ini_boolean_displayer_cb
- And when I install php-gd, php-devel, it has error like that:
yum install php-gd
......
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-common = 5.1.6-23.2.el5_3 for package: php-gd
--> Finished Dependency Resolution
php-gd-5.1.6-23.2.el5_3.x86_64 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-23.2.el5_3 is needed by package php-gd-5.1.6-23.2.el5_3.x86_64 (base)
Error: Missing Dependency: php-common = 5.1.6-23.2.el5_3 is needed by package php-gd-5.1.6-23.2.el5_3.x86_64 (base)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

How can I resolve this problem?







idumitru: 01.03.2010 at 03:22PM PST, ID: 26167512
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --with-libdir=lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-dir=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/usr/share/file/magic.mime --without-sqlite --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apxs --with-mysql --disable-dba --without-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter --enable-mbstring --with-mcrypt --with-mysqli  --with-gd  --with-xmlrpc --enable-dom --enable-libxml --with-imap --with-imap-ssl

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of idumitru
idumitru
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, This is my result:
1. php -v
PHP Warning:  PHP Startup: dbase: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: gd: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ldap.so' - /usr/lib64/php/modules/ldap.so: undefined symbol: third_arg_force_ref in Unknown on line 0
PHP Warning:  PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20050922
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP 5.3.1 (cli) (built: Jan  4 2010 20:05:23)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies



2. yum install php-gd
...
--> Running transaction check
---> Package php-gd.x86_64 0:5.1.6-23.2.el5_3 set to be updated
--> Finished Dependency Resolution
...
Total download size: 116 k
Is this ok [y/N]: y
...
Installed:
  php-gd.x86_64 0:5.1.6-23.2.el5_3

---------------------------------------------------------------------------
So, I think there is cofusion between 5.3.1 and 5.1.6 here?
And If will this cause any errors  in my system in the future?

that happens because you mix yum with a compiled version of php. what you need to do is to remove any php package (including extensions) with yum remove and then recompile php. the configure command i gave also compiles in the usual extensions that you may need. but the configure is for php 5.2.x so I'm not sure if it will work ok with 5.3. but in any case, first remove all extensions and then compile php again and see if it runs ok for what you need.
Yes, It's clear. It may be last question:
But how when I want to add more Module later?
For example, if now I not install php-mysql or php-gd, and in the future, I want to install it.

Will I need to recompile with option of mysql or php-gd?

Thank you!!
yes, you need to recompile php. that's the easiest way
Thank you very much!!!
(I rewite command here, if any want need help)

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --with-libdir=lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-dir=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/usr/share/file/magic.mime --without-sqlite --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apxs --with-mysql --disable-dba --without-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter --enable-mbstring --with-mcrypt --with-mysqli  --with-gd  --with-xmlrpc --enable-dom --enable-libxml --with-imap --with-imap-ssl