Support » Plugin: WP DB Driver » Testing results version 1.1

  • WP 3.6-beta4-24523:

    Any combination of extensions work, as long as at least one is installed.

    Suggestion 1: Do not allow (the button) to remove the db.php driver drop-in if mysql extension is not loaded, as this “suicide”. Not even on plugin deactivation. This suggestion is only relevant for the plugin as a tool.

    Suggestion 2: For PHP 5.3 the mysql extension should have priority, then pdo, mysqli last. For PHP 5.2 the mysql extension should have priority, then mysql, pdo last.

    Suggestion 3: Allow for a wp-config.php constant to set driver (priority) as a string or serialized array: define ('WP_DB_DRIVER', serialize(array('mysqli', 'mysql', 'pdo')));

    Will get back to these issues on trac.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marko Heijnen


    Suggestion 1 is something I want to look at. Also because if none of the drivers are available it wouldn’t fall back to the error message that the server is missing the MySQL extension because of the custom db.php file.

    For suggestion 2 and 3 I don’t think this plugin should taken care of. Inside WordPress core I totally can understand different priorities for a certain PHP version and the ability to change that.

    But this plugin is for testing things out. So mysql should always be last in my opinion. Maybe for PHP 5.2 we can load MySQLi first and then PDO so we have some testing for PDO and MySQLi driver.

    Plugin Author Kurt Payne


    I disagree on suggestion #1. A plugin should never be uninstallable. I like the idea, but it’s overstepping the bounds of a plugin.

    For #2 or #3, I agree with Marko.

    It will not make the plugin uninstallable. The primary thing of the suggestion is about the button that this plugin presents.

    Having the button available is actually making this plugin uninstallable when php_mysql isn’t loaded, since it’s dependency, WordPress, crashes.

    1. Install this plugin
    2. Remove php_mysql to demonstrate that WordPress still works
    3. Forget about it for some time
    4. Come back and press the remove button, without first reloaded php_mysql

    The plugin, as software, “knows” that disaster will happen. The user, as human, may do stupid things.

    Plugin Author Marko Heijnen


    I did fix 1 in my own way:

    – You can’t remove db.php from the plugin when mysql extension isn’t installed
    – When you remove the plugin the db.php file will stop working.

    For suggestion 3 you can use WPDB_DRIVER if you prefer something else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Testing results version 1.1’ is closed to new replies.