• Hi,
    I had a “Too many open links” error while generating the sitemap.

    I solved it by making the plugin using wordpress DB conncetion to get post and pages instead of opening a new one.

    File: sitemap-core.php

    Row 1804: insery a new row with:

    global $wpdb;

    Comment or delete from row 1805 to 1815:

    /*
    $con = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD,true);
    if(!$con) {
    	trigger_error("MySQL Connection failed: " . mysql_error(),E_USER_NOTICE);
    	return;
    }
    if(!mysql_select_db(DB_NAME,$con)) {
    	trigger_error("MySQL DB Select failed: " . mysql_error(),E_USER_NOTICE);
    	return;
    }
    $postRes = mysql_unbuffered_query($sql,$con);
    */

    Insert a new row immediately after:
    $postRes = $wpdb->get_results($sql, OBJECT_K);

    Replace row 1856 (circa):

    while($post = mysql_fetch_object($postRes)) {

    with

    foreach ( $postRes as $post ) {

    That’s it

    http://wordpress.org/extend/plugins/google-sitemap-generator/

The topic ‘[Plugin: Google XML Sitemaps] "Too many open links" error’ is closed to new replies.