?
Solved

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

Posted on 2010-01-03
10
Medium Priority
?
3,748 Views
Last Modified: 2013-12-13
I found sollution here, for 32 bit
http://www.experts-exchange.com/Database/MySQL/Q_24947235.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!
0
Comment
Question by:bxglxbxglx2000
  • 6
  • 3
10 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 26165869
Check this page.  It has some Red Hat notes that may be helpful:
http://us.php.net/manual/en/install.unix.php
0
 

Author Comment

by:bxglxbxglx2000
ID: 26166001
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)
0
 

Author Comment

by:bxglxbxglx2000
ID: 26168336
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

0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 3

Accepted Solution

by:
idumitru earned 2000 total points
ID: 26169092
when you compile from source you can no longer use yum to add aditional extensions such as yum install php-gd or php-devel. if you ran  yum install php-gd that means you need to recompile the source.
before recompiling make sure you remove any php extension that is installed with yum remove.
run  
yum list php*
and then remove all the php base extensions including the php package. recompile and let me know how it goes
0
 

Author Comment

by:bxglxbxglx2000
ID: 26177821
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?

0
 
LVL 3

Expert Comment

by:idumitru
ID: 26179209
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.
0
 

Author Comment

by:bxglxbxglx2000
ID: 26179285
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!!
0
 
LVL 3

Expert Comment

by:idumitru
ID: 26179294
yes, you need to recompile php. that's the easiest way
0
 

Author Comment

by:bxglxbxglx2000
ID: 26179496
Thank you very much!!!
0
 

Author Comment

by:bxglxbxglx2000
ID: 26179503
(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

0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question