WordPress.org

Forums

WP Db Abstraction
Installation error (my_sql_free_result in wb-db.php, line 1122) (3 posts)

  1. cdelaorden
    Member
    Posted 2 years ago #

    Hi all

    I followed all steps twice. After configuring the DB (which I had to fix because the wp_config.php generated by the plugin didn't fill my db, user and password), I run the WP install.

    After filling the details and submitting the form, I get a full screen of PHP warnings with the message:

    mysql_free_result(): supplied resource is not a valid MySQL result resource in C:\Trabajo\wpsqlserver\wp-includes\wp-db.php on line 1122

    The URL is http://localhost:82/wp-admin/install.php?step=2

    If I check the db with SQL Management Studio, I see the tables are created but the admin user is not. Thus if I ignore these warnings and try to browse the site, I can't login because no user was created.

    I'm using WordPress 3.5 (Spanish), SQL Express 2008, PHP 5.3.19.

    What should I check?

    http://wordpress.org/extend/plugins/wordpress-database-abstraction/

  2. Loshu
    Member
    Posted 2 years ago #

    I had this problem too

    http://wordpress.stackexchange.com/questions/44844/wordpress-iis7-sql-server-2008-not-showing-posts-displays-nothing-found
    suggests
    commenting out line 391 of \wp-content\mu-plugins\wp-db-abstraction\translations\sqlsrv\translations.php

    That worked for me so far :)

  3. fabhren
    Member
    Posted 2 years ago #

    Hi

    This error is being generated by a lack of override in sqlsrv.php driver.

    Please add the following in wp-db-abstraction\drivers\sqlsrv.php, after print_error method:

    /**
    	 * Kill cached query results.
    		*
    	 * @since 0.71
    	 * @return void
    	 */
    	function flush() {
    		$this->last_result = array();
    		$this->col_info    = null;
    		$this->last_query  = null;
    
    		if ( is_resource( $this->result ) )
    			sqlsrv_free_stmt( $this->result );
    	}

    I've found out about this function sqlsrv_free_stmt in http://msdn.microsoft.com/en-us/library/cc296152(v=sql.105).aspx.

    Hope this helps people trying to move this plugin forward.
    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Db Abstraction
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.