Page 1 of 1

ARRGGGHHH

Posted: Thu Jan 31, 2008 4:59 am
by Monotoko
sorry for the title, but i feel like killing something at the moment, i have installed:

apache - works fine
php - works fine
mysql - works fine

so, why, when i try to use the code at the bottom does it come up with

Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 5

Code: Select all

<?
 
$con = mysql_connect("localhost","xxxx","xxxx");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
?>
thanks for any help ~ Monotoko

Re: ARRGGGHHH

Posted: Thu Jan 31, 2008 5:31 am
by VladSun
You need to install/configure PHP with MySQL support.

Re: ARRGGGHHH

Posted: Sat Feb 09, 2008 3:40 am
by Monotoko
ok, how do i do that?

(sorry, i havent tried to set my own server up before and do not know how to do it)

Re: ARRGGGHHH

Posted: Sat Feb 09, 2008 9:57 am
by Christopher
You need to enable the mysql extension in your php.ini file. See the PHP manual.

Re: ARRGGGHHH

Posted: Sat Feb 09, 2008 12:05 pm
by Kieran Huggins
if you're on Windows you may just need to uncomment the mysql.dll line in php.ini

sqlite is built-in to php5 by default, so that may be an alternative.