Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 28th, 2003, 03:57 PM
Registered User
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shabboleth
Default undefined function: mysql_connect()

I am running PHP on Red Hat 9. The result screen from running phpinfo() shows that I have '--with-mysql=shared,/usr' option configured. However when I try to run the database and table listing script from page 402 of "Beginning PHP" I get the following error:

 Fatal error: Call to undefined function: mysql_connect() in /var/www/html/showdb.php on line 6

I am pretty new to Linux and very new to PHP. I appreciate any help I can get on this problem.

Old August 28th, 2003, 04:16 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

Take a look at these:

I haven't installed PHP using RPMs, just the good-ol' ./configure n' make approach. This seems to be an issue with the Red Hat RPM installation.

Take care,

Old September 18th, 2003, 05:09 PM
Registered User
Join Date: Sep 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

The .rpm's are just seperate the one that needs installing is


that is for Disk 2 for RH9 or go to



Similar Threads
Thread Thread Starter Forum Replies Last Post
i can not use the mysql_connect() function g.tamilselvan MySQL 2 February 14th, 2006 09:03 AM
Undefined Function Error arimakidd Beginning PHP 2 November 10th, 2005 02:54 AM
Call to undefined function mysql_connect() tks_muthu PHP Databases 2 June 14th, 2005 01:23 AM
undefined function vurtman ASP.NET 1.0 and 1.1 Basics 8 October 4th, 2004 01:32 PM
Undefined function dhborchardt Classic ASP Databases 0 June 7th, 2004 03:31 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.