Results 1 to 2 of 2

Thread: Fatal Error

  1. #1
    Join Date
    Nov 2009

    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);
    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);
    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
    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.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

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