Click to See Complete Forum and Search --> : Another PHP_MySQL question


hazmtrl
09-16-2003, 05:10 PM
Please don't flog me yet, I have followed about every idea given on here about the PHP_MySQL rpms, through the www.mysql.com documentation, and www.php.net documentation, and just about everything else including sourceforge.net, and a few other sites here and there. I have researched this but all the examples I find, I can not get going for me. I can use PHP,

<?php
phpinfo();
?>

And MySQL is supported

dbx
dbx support enabled
dbx version 1.0.0
supported databases MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (not really)
Sybase-CT


and I CAN connect to MySQL from a command line. My problem...

I can not get php to connect to MySQL database. I get the infamous error

Fatal error: Call to undefined function: mysql_connect()

I am running an Apache Server, basic install that comes with RedHat, as well as the PHP, basic install from RedHat CD. I installed MySQL-Server and Client as well as libraries and the other works. Still no luck.

I read on here that I needed php_mysql.VERSION.i386.rpm, so I found it at www.rpmfind.com installed it, but kept getting an error that php = 4.2.2-8.08 is needed by php-mysql-4.2.2-8.08. So I decided I would try to update php, with the source file, moved to php-4.3.3.

I used ./configue --with-mysql=/usr/local/mysql ran make and make install.

I find a new php_myql rpm for 4.3.3 and tried installing it, but got the same error message just different version. I have also gathered the MySQL-shared installed it, took away a few of the other missing file errors. I am still not getting anywhere, still can not get mysql to connect to php. Can Someone break this down into Crayon for me? If there is any other information I can provide, please let me know.

I thank you for your time and patience, with any help you can offer.

sharth
09-16-2003, 05:30 PM
you probably need the mysql module for php. in debian, php4-mysql

hazmtrl
09-16-2003, 06:02 PM
Don't exactly understand what that is. Can you explain that a little more?

hazmtrl
09-18-2003, 01:41 PM
Got it figured out, decided to dump everything and start over. Smooth sailing from here.

andycrofts
09-18-2003, 02:08 PM
.....a bit more searching, and you'd have found the
apt-get stuff.

apt-get install php httpd mysql-server php-mysql mysql

Oh, well.....

ikellen
09-20-2003, 12:20 AM
Coould have installed from source and just said "./configure --with-mysql" :D

hazmtrl
09-22-2003, 10:58 AM
apt-get, saw that a little too late. whoops!

and the ./configure --with-mysql I tried that from the source, but I kept getting errors during the make process. oh well too late to turn back now. Thanks for the comments.