Solved

PHP 5 to 4 downgrade

Posted on 2006-11-05
6
864 Views
Last Modified: 2013-12-13
Okay experts, I am out of my league on this one so I need some very specific help.  My company has been using a LINUX based file exchange package that runs on PHP and Zend.  We LOVE this thing but the hardware decided it didn’t want to play any more.  I have replaced the HW with newer, better, stronger (you get the idea) and installed Red Hat Fedora.  This version comes with PHP 5.1.4.  Apparently this version does not have the --with-mysql' option turned on.  I have spent 7 days trying to figure out how to turn it on and recompile PHP with no luck.  

The questions:  Can I just uninstall 5 and go back to 4? OR Is it easier to recompile with the option on and if so, what specific command do I need to put in?

I ran phpinfo.php and this is the configure command:

'./configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-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/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--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-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'

If I am ready the instructions correctly, I need to change ‘--without-mysql' to –with-mysql=/usr/bin/mysql but I do not know whare or how to do this.

Help help help

0
Comment
Question by:Helixx
6 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17879163
you take this command, and run it in the command line. (of course with the option --with-mysql set instead of --without-mysql)
you only have to ensure that the resource file mysql.o is present also in the inluced lib directory
0
 
LVL 48

Expert Comment

by:hernst42
ID: 17880059
If you use Fedore core there must be a package php5-mysql or php-mysql which will bring the support for mysql and php5. after installing that package restart the webserver and check if the mysql-extension is activated automaticly. If not edit the php.ini and add
extension=mysql.so
and restart the webserver again. Now you should habe mysql-support. Many distibutuion create php without an extension, but have many small packages with the extensions.
0
 
LVL 1

Author Comment

by:Helixx
ID: 17886271
okay.  
Where do I get the php5-mysql or php-mysql or mysql.o?
Do I just put it in the /lib directory?
I have to type everything in the block above starting with ./configure?  !!  (Can't I just do ./configure –with-mysql=/usr/bin/mysql? and the computer will remember the rest?)
Which directory do I do this process in? ./lib? there is no file called configure in /lib.
Is there an RPM command that will downlaod and install this option?

I still have hope!
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Author Comment

by:Helixx
ID: 17893934
Anyone?
0
 
LVL 1

Author Comment

by:Helixx
ID: 17894787
I ended up runing this from the command

yum install yumex

Then under the GUI going to Applications and System Tools and running Yum Extender.
I found the PHP-mysql module and selected it for download.  Yum installed and configured everything for me.
0
 
LVL 14

Accepted Solution

by:
ygoutham earned 500 total points
ID: 17963964
normally a simple

yum install php-mysql

should have done the trick.  i had a FC5 and selected php-mysql at install and it worked fine.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 look for a specific file type in a local or remote server directory using PHP.

786 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