www.webdeveloper.com
Results 1 to 2 of 2

Thread: Fatal Error

  1. #1
    Join Date
    Nov 2009
    Posts
    41

    Fatal Error

    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) */

    $server = "localhost";
    $user = "root";
    $pass = "******";
    $dbase = "queen";
    $table = "events";

    /* 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.";
    }

    ?>
    Where to start if anyone knows
    Thank you

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,225
    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

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles