Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old August 28th, 2003, 03:57 PM
Registered User
 
Join Date: Aug 2003
Location: Camas, WA, .
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.

  #2 (permalink)  
Old August 28th, 2003, 04:16 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Take a look at these:
  http://www.phpbuilder.com/mail/php-db/2002122/0126.php
  http://dbforums.com/arch/149/2002/11/559215

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,

Nik
http://www.bigaction.org/
  #3 (permalink)  
Old September 18th, 2003, 05:09 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

php-mysql-4.2.2-17.i386.rpm

that is for Disk 2 for RH9 or go to

http://www.redhat.com/swr/i386/php-m...7.i386_dl.html

Rob



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.