#1  
Old 1st May 2007, 10:58
weslkers weslkers is offline
Member
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL

i doing the PHP Connection test with Mysql~ Here is the coding,

<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';

// username and password to log onto db server
$dbUser='root';
$dbPass='';

// name of database
$dbName='test';

$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect");
print "Connected successfully<br>";
mysql_select_db("$dbName") or die("Could not select database");
print "Database selected successfully<br>";

// close connection
mysql_close($link);
?>


I received this error,

Fatal error: Call to undefined function mysql_connect() in D:\public_html\phpconection.php on line 12

Any wrong code on line 12?
Reply With Quote
Sponsored Links
  #2  
Old 2nd May 2007, 13:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by weslkers
Fatal error: Call to undefined function mysql_connect() in D:\public_html\phpconection.php on line 12
This indicates that there is no MySQL support in your PHP installation? Did you install and enable the PHP-MySQL module?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed up ISPConfig-2.2.8 Upgrade Morons Installation/Configuration 4 29th November 2006 12:17
MySQL Cluster On FC5 : error while unpacking from engine asyadiqin HOWTO-Related Questions 7 28th October 2006 17:37
I'm dying! m u r Installation/Configuration 41 17th September 2006 13:44
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 11:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.