Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 2nd, 2005, 04:28 AM
Authorized User
 
Join Date: Nov 2004
Location: CHENNAI, TamilNadu, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tks_muthu
Default Call to undefined function mysql_connect()

hi all!

i am using windows xp and iis 6.0. whenever i open the php page
i got the following error message:-

Call to undefined function mysql_connect()
my source :

<?php
$db_name='sample';
$conn=mysql_connect('servername','username','passw ord') or die('Error connecting to mysql');
mysql_select_db('db_name');
?>

plz help.



Muthu
__________________
Muthu
Reply With Quote
  #2 (permalink)  
Old June 2nd, 2005, 07:06 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

>> Call to undefined function mysql_connect()

First are you using PHP 5? and see if phpinfo() shows MySQL module.

Reply With Quote
  #3 (permalink)  
Old June 14th, 2005, 01:23 AM
Registered User
 
Join Date: Jun 2005
Location: Mumbai, Maharashtra, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sunnybaba
Default

Quote:
quote:Originally posted by tks_muthu
 hi all!

i am using windows xp and iis 6.0. whenever i open the php page
i got the following error message:-

Call to undefined function mysql_connect()



Muthu
Aaaaaaaaah php5 and its curious ways!
The reason it happens is because PHP5 does not provide built-in
support for MySql (like PHP4 and below did).
Here's a webpage with a fix for the problem.
http://www.siteinaweek.com/installphp5/howto.php


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal error: Call to undefined function mysql_pcon surendran Beginning PHP 2 May 23rd, 2006 10:41 PM
i can not use the mysql_connect() function g.tamilselvan MySQL 2 February 14th, 2006 09:03 AM
Undefined function dhborchardt Classic ASP Databases 0 June 7th, 2004 03:31 PM
error Call to undefined function: query() gmanon Wrox Book Feedback 1 November 20th, 2003 06:34 PM
undefined function: mysql_connect() shabboleth Beginning PHP 2 September 18th, 2003 05:09 PM



All times are GMT -4. The time now is 09:42 PM.


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