Re: Undefined function - mysql_connect()

From: Date: Tue, 12 Dec 2000 04:32:29 +0000
Subject: Re: Undefined function - mysql_connect()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29808@lists.php.net to get a copy of this message
>hi. i installed apache, mysql, and php4 using the .deb packages by >this: > >apt-get install apache mysql-server php4-mysql You probably need some "dev" packages, if it's anything like RedHat. >and although the "phpinfo()" test works to confirm that apache *is* >working with php, i'm unable to confirm whether php and mysql works Either it lists MySQL, or you ain't got it. >together. this i found out later when i created some sample php >scripts. i was using "mysql_connect()" and i would get the error >message that "mysql_connect()" is an undefined function. i searched >"www.faqts.org" for answers and was told that either i have to put: > >dl("mysql.so"); > >on top of every php script i create or recompile php using the >"--with-mysql" switch. i tried the first option and got: > >Unable to load dynamic library '$(prefix)/lib/php4/mysql.so' >- $(prefix)/lib/php4/mysql.so: cannot open shared object file: Does mysql.so exist? In that directory? And I dunno what $(prefix) is... Maybe that's okay as part of the error message, or maybe something is messed up... >so my other option is to recompile but i'm not using the source so i >must be missing some .deb packages. the question is which package? You may find it easier to compile from source. There are 50 options to compile PHP. The odds on a given pre-compiled package having the exact choices you want is therefore 1 in 50!. I dunno how big 50! is exactly, but "a bazillion" is a good approximation.

« previous php.general (#29808) next »