Your Database version must be at least 4.1.1

John Griss
2009-09-21
2013-04-23
  • John Griss
    John Griss
    2009-09-21

    I am using the latest version of Xampp with has MySQL 5.1.37, PHP 5.3.0 and after following the installation instructions exactly. The SQL tables were created, permissions checked out, verified versions of everything, and double checked the changed .

    http://localhost/cal/index.php -
    Message:
    "Your Database version must be at least 4.1.1
    Aborting Calendar Script"

    What am I missing?

    Thanks! :)

     
  • Reece
    Reece
    2009-09-21

    That's weird…

    I get the version of SQL server by a function in /databases/mysql.php called sql_version():

    http://reececalendar.svn.sourceforge.net/viewvc/reececalendar/branches/Version%200.9/databases/mysql.php?revision=1&view=markup

    I essentially just use the mysql_get_server_info() php function, and parse the results from that to find the version.

    You can run that manually in a php script to see what it's returning and why the function mentioned above is not parsing it correctly…. I'd be interested to know what it's returning for your site.

    If you don't care and just want it fixed, you can remove the version check from the top of the /index.php file. 

    -Reece

     
  • Reece
    Reece
    2009-09-21

    Ahem, that's the "mysql\_get\_server\_info()" function…. stupid markdown.

     
  • rook
    rook
    2011-02-11

    Hi, I know it's late but I just installed your calendar and got the same error. I fixed it modifying the version parsing function as follows:

    function sql_version(){
            // get version.
            $v = @mysql_get_server_info($this->db_connect_id);
            if(!$v) return "(ERROR FETCHING VERSION)";
            $v = substr($v, 0, strlen($v));
            $a = explode(".",$v);
            // check version.  If they have at least 4.1.1 it's okay, return nothing.
            if($a[0]>=5) return "";
            if($a[0]==4 AND $a[1]>1) return "";
            if($a[0]==4 AND $a[1]==1 AND $a[2]>=1) return "";
            // this is BAD!  This returns the version you need at MINIMUM
            return "4.1.1";
        }
    

    Basically, this line

    $v = substr($v, 0, strlen($v));
    

    is changed.