Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-16-2004, 02:29 PM   #1
Registered: May 2003
Distribution: Slackware
Posts: 236

Rep: Reputation: 31
Call to undefined function: mysql_connect()

Ok, I have been searching for a couple days now on how to resolve this issue. The line is uncommented in php.ini, so that's one option checked off the list. My syntax is correct, because the same file works on other machines.

I'm running PHP 4.3.9 and MySQL 4.1.7 w/ apache2. I've grabbed the latest slack packages and installed them. After a few other issues, I finally got PHP working and got it working under apache.

Here is the output of my ./configure line from PHP:
'./configure' '--prefix=/usr' '--enable-discard-path' '--with-config-file-path=/etc/apache2' '--enable-safe-mode' '--with-openssl' '--enable-bcmath' '--with-bz2' '--with-pic' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--with-db3' '--with-imap=shared,/usr' '--with-imap-ssl' '--enable-dbase' '--enable-dba' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-freetype-dir=/usr' '--with-gmp' '--with-mysql=shared,/usr' '--with-pgsql=shared,/usr' '--with-xml' '--enable-trans-sid' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-yp' '--enable-memory-limit' '--with-tsrm-pthreads' '--enable-shared' '--disable-debug' '--with-zlib' '--with-t1lib' '--with-pspell=shared' '--with-mhash' '--with-gettext' '--with-xsl' '--with-iconv' '--enable-inline-optimization' '--disable-static' '--with-curl' '--enable-exif' '--enable-magic-quotes' '--with-readline' '--enable-force-cgi-redirect' '--enable-fastcgi' '--enable-pcntl' '--enable-sigchild' '--with-apxs2=/usr/sbin/apxs' '--sysconfdir=/etc'

so, I have no idea what is going on. I did some reading, and a possible solution for redhat users is to install the php4-mysql RPM - however, I'm running slack 10.
Old 11-16-2004, 02:52 PM   #2
Registered: Jun 2003
Posts: 52

Rep: Reputation: 15
create a php page with the following:




And see if php knows that it has support for mysql built in. If the function is undefined, its because the support just isn't there. I've had the same problem before.

Also, check out and you'll probably have more luck there.

Last edited by jon3k; 11-16-2004 at 02:54 PM.
Old 11-16-2004, 03:24 PM   #3
Registered: May 2003
Distribution: Slackware
Posts: 236

Original Poster
Rep: Reputation: 31
That ./configure output I posted above is the only MySQL related info I get from phpinfo.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Call to undefined function imagettfbbox() QtCoder Programming 24 01-18-2012 01:20 PM
Call to undefined function mail() The_Lance SUSE / openSUSE 1 04-12-2005 09:55 AM
Call to undefined function domxml_open_mem() apt Programming 2 04-01-2005 04:25 AM
Call to undefined function: mail() in PHP pembo13 Fedora 0 07-28-2004 08:40 PM
undefined function: mysql_connect Greenman Programming 8 12-27-2003 06:35 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration