I have this php script.
<?php
require ($_SERVER["DOCUMENT_ROOT"] . "/config/db_config.php");
$connection = mysql_connect($db_host, $db_user, $db_password) or die("Error Connecting");
echo "Connection Sucessful";
?>
When I run this script, I get this error message:
Fatal error: Call to undefined function mysql_connect() in F:\web site\webroot\temp_con.php on line 4
I am not sure what is wrong with the mysql_connect() function.
I am running mysql server 4.1 and php 5.
Could this be something to do with the php.ini file? I don't have one but I have two files in my php directory
php.ini-dist
php.ini-recomended
I am new to php. Do I have to rename one of these files? Do I have to put it in another directory?
Any help will be gratefully accepted.
thanks
<?php
require ($_SERVER["DOCUMENT_ROOT"] . "/config/db_config.php");
$connection = mysql_connect($db_host, $db_user, $db_password) or die("Error Connecting");
echo "Connection Sucessful";
?>
When I run this script, I get this error message:
Fatal error: Call to undefined function mysql_connect() in F:\web site\webroot\temp_con.php on line 4
I am not sure what is wrong with the mysql_connect() function.
I am running mysql server 4.1 and php 5.
Could this be something to do with the php.ini file? I don't have one but I have two files in my php directory
php.ini-dist
php.ini-recomended
I am new to php. Do I have to rename one of these files? Do I have to put it in another directory?
Any help will be gratefully accepted.
thanks