when trying to start php event calendar it shows this:
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\calendar\dbaseConn.inc on line 12
The script is here:
?
/* Define some variables which we will use to connect to the database (change these accordingly) */
/* Now connect to the database */ $mysqlConnect = mysql_connect($server, $user, $pass);
if(!$mysqlConnect){
echo "Could not connect to the MySQL server - check if it is running and if you actually have permission to connect to it. Your database administrator can tell you this.";
}
$dbaseSelect = mysql_select_db($dbase);
if(!$dbaseSelect){
echo "Connected to the MySQL server but could not select the database \"{$dbase}\". This may be because you do not have permission. Your database administrator can tell you this.";
}
The undefined function would indicate that your current PHP installation does not have the MySQL extension installed and enabled. You could check to see if the MySQLi extension is installed, or else you will need to install MySQL or MySQLi yourself (the latter is the newer, preferred extension for current versions of PHP, though the older is still supported), or ask the server admin to do so.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks