ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MySQLi Driver Issues when installing Expression Engine Core

January 06, 2008 10:30am

Subscribe [1]
  • #1 / Jan 06, 2008 10:30am

    Patric Brown

    2 posts

    Hi All,

    I thought some of you might find this helpful.  I recently installed Expression Engine on a Windows XP system with PHP 5 and MySQL 5 installed, not a particularly uncommon installation.  I stepped through the easy-to-follow Expression Engine installation instructions, and when I got to the final screen (where I expected to see success) I got nothing but the header and a whole lot of blank screen.

    Figuring I couldn’t be the first to experience this, I searched the helpful forums for support.  The obvious first step was checking the database connection, and EE has provided a helpful file for this, found at ..\system\utilities\dbtest.php, which you can edit to your own db credentials.  I did this, and still a white screen.

    Now, I know my PHP/MySQL credentials are working because I have developed apps with CodeIgniter.  So I look at my CodeIgniter config.  I have a line that states:

    $db[‘default’][‘dbdriver’] = “mysqli”;

    So to further test, I change the dbtest.php file, line 12(?) from:

    $result = ($conn_type == 1) ? mysql_pconnect($hostname, $username, $password) : mysql_connect($hostname, $username, $password);

    to:

    $result = ($conn_type == 1) ? mysql_pconnect($hostname, $username, $password) : mysqli_connect($hostname, $username, $password);

    Note that I am now testing mysqli_connect instead of mysql_connect.

    AND… it works.

    Now the solution to getting Expression Engine to work:
    1) Enable mysql_connect within PHP.  In my case, this meant downloading a new PHP Connector from Mysql.com, copying the files to the proper location, and adding extension=php_mysql.dll to my php.ini file.

    2) Taking MySQL out of strict mode.  To do so, go to MySQL Administrator, choose Startup Variables, then the Advanced tab.  In the field SQL mode, delete “STRICT_TRANS_TABLES” from the beginning of the line.  Next stop, then start the service.

    Stepping through the installation again after this, everything went fine.

    Hope this helps someone who has the same issues I experienced.  Some of the solution is in other posts, but I did not find anything specific to MySQLi, which is a common install configuration at this point.  Expression Engine is a great program, and I’d hate to see anyone discouraged by installation issues.  If anyone needs further details for the above, let me know.

    Patric

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases