WordPress.org

Make WordPress Core

Ticket #383: 0000383-check_mysql.patch

File 0000383-check_mysql.patch, 605 bytes (added by anonymousbugger, 17 years ago)
  • wp-includes/wp-db.php

    old new  
    4040        //      DB Constructor - connects to the server and selects a database
    4141
    4242        function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
     43                if (!is_callable("mysql_connect"))
     44                {
     45                        $this->bail("
     46<h1>MySQL extension not installed</h1>
     47<p>It appears that your PHP installation is missing the MySQL module which is required for running WordPress</p>
     48");
     49                };
    4350                $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);
    4451                if (!$this->dbh) {
    4552                        $this->bail("