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!
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!
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)
If I need reinstall Apache from source ?
Then also Install PHP from source?
(it really complex for me)
ASKER
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/l ibphp5.so into server: /usr/lib64/httpd/modules/l ibphp5.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.x8 6_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.x8 6_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.x8 6_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?
- But when I restart apache, it has error:
Starting httpd: httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf
- 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.x8
--> Missing Dependency: php-common = 5.1.6-23.2.el5_3 is needed by package php-gd-5.1.6-23.2.el5_3.x8
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.x8
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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/ld ap.so' - /usr/lib64/php/modules/lda p.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?
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/ld
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.
ASKER
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!!
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
ASKER
Thank you very much!!!
ASKER
(I rewite command here, if any want need help)
./configure --build=x86_64-redhat-linu x-gnu --host=x86_64-redhat-linux -gnu --target=x86_64-redhat-lin ux-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.cac he --with-config-file-path=/e tc --with-config-file-scan-di r=/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,/us r --enable-shmop --enable-calendar --with-mime-magic=/usr/sha re/file/ma gic.mime --without-sqlite --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apx s --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
./configure --build=x86_64-redhat-linu
http://us.php.net/manual/en/install.unix.php