Click to See Complete Forum and Search --> : Configuring Php with Mysql
Hello.. Ive just had a RedHat 7.1 machine set up that has php and Mysql installed on it already. I ran a phpinfo() on it and it shows that php is not configured to work with Mysql (the configure statement shows --without mysql)
Im assuming that php and mysql were installed via an rpm and I was under the impression that if you install php 4 (via rpm) after you install mysql that it configures itself to work with mysql. However, since mine isn't configured with mysql im not sure why?
My question now is, Is there a way I can configure php to use -with mysql instead of --without mysql now? Or do I have to completely uninstall php first and reinstall it again?
Any help will greatly be appreciated and it will save a computer (as Im about to throw mine out the window :)
thanks,
Greg
comidio
09-01-2001, 07:12 PM
It is my understanding that you can still use mysql with php. I could be off base but I think that basic mysql functionality is built into php and that you might be missing a few bells and whistles and will cause problems if you use perl to also access mysql. But you should be okay I would try a few test scripts before I go messing around with your configuration. But like I said take my advice with a grain of salt.
CI
Hello.. Ive tried running some Mysql functions and they don't work. I get:
'Call to undefined function: mysql_connect()'
All other php functionality works, just not mysql.
mithril
09-01-2001, 11:56 PM
Greg,
I've no experience with RedHat per say, but I'm thinking you should be able to grab a PHP4 RPM that is compiled using the --with-mysql option. Otherwise, you can grab source tarballs for both Apache and PHP and compile from source. Remember to remove the Apache and PHP rpm installations before compiling, might also be helpful to do make clean when compiling PHP. HTH.
geoff
Thanks all for you help..
In case this will help someone else..
I ended up uninstalling the previous php rpm by finding out which version rpm I had installed and then using the rpm -e php4.0.4.*-* (there were 3 packages i needed to uninstall.. imap rpm and something else.. You will receive an error when trying to install the new rpm's that will let you know which other rpm's to uninstall)
I then downloaded all of the new rpm's located here:
http://rpms.arvin.dk/php/rh71/i686/ (for RedHat7.1 only) including php-4.0.6 and mod_php (and php-mysql package)..
I received a few errors during install but I quickly found the fixes based on error messages.
Ex. It wouldn't allow me to rpm the mod_php package because it said I was missing an 'mm' something or other.. I then found that I needed a package installed first before I could install the mod_php file. You can get this package here:
http://rpms.arvin.dk/mm/rh71/
(called mm-1.1.3-6.arvin.rh7.1.i586.rpm)
Once I installed all this, the php worked perfectly and had mysql support..
hope this helps,
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.