Click to See Complete Forum and Search --> : Can't get PHP to use mysql_connect() !!!


Anon
09-28-2000, 05:18 PM
hi, i'm just starting out in linux. i'm trying to build up my little server box to mirror my sites, so i can work on them offline, and locally. i'm using redhat 6.2, and got mysql 3.22 (i think) installed just fine. i got php3 workin as well, but i can't get it to recognize mysql_connect()

i believe i need to set up s mod_mysql in apache or something - heard somethin about mod_auth_mysql?

where should i go from here?

thank you so much in advance if you can help me out, i've already wasted too many hours through this downtime.

blake.

Anon
10-03-2000, 12:43 AM
what error do you get?

Anon
10-03-2000, 02:21 AM
Thanks, i found the problem. I needed to uninstall PHP and Apache (from my default redhat installations), and reinstall them both, along with MySQL. I added this line to the PHP install:

--with-apache=/usr/src/apache

and it took care of the problem. I didn't have MySQL support compiled in the PHP3 source, so i was getting the error that the mysql_pconnect() was unsupported.

this link set me straight, real easy, esp for this linux newbie!

http://www.goodnet.com/~tim/mysql.html


thanks for the reply,

blake