Page 1 of 1

php coding not supporting mysql_connect()

Posted: Mon Oct 13, 2003 5:06 am
by nilotpal
Hi,

my linux server contain php and mysql as well and it is working indivisually
i write code in php but the connection script not working
error display error:-mysql_connect() is not defined.
when i see the information of phpinfo
it shows dbx information not mysql information,
ples help so that i can connect php with mysql.
regards,
Nilotpal

Posted: Mon Oct 13, 2003 7:42 am
by devork
your php is not compiled with mysql
...

how to compile php with mysql

Posted: Tue Oct 14, 2003 12:15 am
by nilotpal
please tell me how to compile php with mysql.
thankx.

Posted: Tue Oct 14, 2003 4:10 am
by JAM
http://se.php.net/manual/en/install.linux.php

Take a peek at the first usercomment.

Code: Select all

./configure --prefix=$prefix --with-thttpd=../thttpd-2.21b --with-config-file-path=$prefix/lib/php --with-zlib --with-bz2 --with-gd --with-ttf --with-mysql --with-mysql-sock=/var/run/mysqld/mysqld.sock --disable-rpath --disable-ipv6 --enable-static --enable-roxen-zts --enable-track-vars --enable-force-cgi-redirect --with-gettext

my php is compiled with mysql but.....

Posted: Wed Oct 15, 2003 2:51 am
by nilotpal
php is compiled with mysql as i see the information on phpinfo but mysql_connect() is not working with php code,my linux version is 8.0 ,
ples help.

Re: my php is compiled with mysql but.....

Posted: Wed Oct 15, 2003 3:00 am
by twigletmac
nilotpal wrote:my linux version is 8.0
There are lots of linux flavours - a version number doesn't really tell us anything.
nilotpal wrote:php is compiled with mysql as i see the information on phpinfo but mysql_connect() is not working
What is your configure information (the bit that looks like what JAM posted). The fact that mysql_connect() is not defined indicates that PHP has not been compiled with MySQL support.

Mac