WordPress.org

Ready to get started?Download WordPress

Forums

DBC Backup 2
[resolved] Can't log in to admin panel (10 posts)

  1. Squid
    Member
    Posted 1 year ago #

    Hi

    I was trying to find a good plugin to backup my site which I just got finished after 3 months of learing and hard work.

    I downloaded your plugin and had just inserted custom secret keys and SALT to wp-config.php file and:

    # protect wpconfig.php
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>after

    to my .htaccess file.

    I had backup 2 downloaded and just waiting for an install in my settings -> plugins . So I clicked it and got logged out with an error message:

    Warning: Cannot modify header information - headers already sent by (output started at .../public_html/wordpress/wp-config.php:1) in /.../public_html/wordpress/wp-includes/pluggable.php on line 881

    After that i get the same error message and can't log in to wordpress. There is nothing wrong with the actual wp-config.php file as it implies as i have checked it more than once. no whitespaces, starting from <?php. I am left to think it has something to do with cache after reading the same error message after installing other plugins but have no real idea if this is the case or where the problem lies. My website is up and running but I just can't log in so i can't uninstall or disable the plugin from my admin panel either.

    All help would be very much appreciated, Thank you

    http://wordpress.org/extend/plugins/dbc-backup-2/

  2. Damien Saunders
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Squid

    First .. sorry you seem to be having issues with your new build of WordPress. Does the problem go away if you remove those lines from the .htaccess?

    I'd be confident that the problem is not with DBC Backup 2 - because it sounds like you did the right thing in the .htaccess file - but did you then change the Permissions to something too restrictive (ie 400 instead of 664/ 667) see also http://wordpress.stackexchange.com/questions/58391/is-moving-wp-config-outside-the-web-root-really-beneficial/58820#58820

    Second ... you can always FTP into your site and rename the plugins folder to plugins.old and create a new folder called plugins -- or if you prefer, just delete the DBC-Backup 2 folder.

    Let me know what you changed as I'd believe its not in DBC-Backup

    hope that helps?

    Damien

  3. Squid
    Member
    Posted 1 year ago #

    Hi and thanks for the swift reply

    Yes I have deleted those lines from htaccess file... Taking off the guard here for a moment.

    Let me summarise in full as I have no experience in programming, maybe you can help me out here. Would appreciate it very much.

    *Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/wordpress/wp-config.php:1) in /home/xxxxxx/public_html/wordpress/wp-includes/pluggable.php on line 881*

    pluggable.php 881:

    function wp_redirect($location, $status = 302) {
    global $is_IIS; 
    
    $location = apply_filters('wp_redirect', $location, $status);
    $status = apply_filters('wp_redirect_status', $status, $location); 
    
    if ( !$location ) // allows the wp_redirect filter to cancel a redirect
        return false; 
    
    $location = wp_sanitize_redirect($location); 
    
    if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
        status_header($status); // This causes problems on IIS and some FastCGI setups 
    
    header("Location: $location", true, $status);
    }
    endif;

    Now wp-config usually refers to hidden whitespace at the begining of the file or at the end but I have checked this and even inserted new wp-config file so the problem is not there. It has something to do with the latest wordpress version and the code dbs installed. I am using the latest version wordpress 3.4.2. My site seems to be working just fine but the error prevents me getting in to the login page which means I can't admin at all or uninstall the plugin which seems to have triggered this problem. I have checked the wp.config file hunderds of times with HTML-kit tools and there is no visible whitespace at the begining nor at the end of the file. I have:

    1.Checked the whitespaces from wp-config file with HTML-Kit tools
    2.Downloaded and inserted new fresh wp-config file
    3 Deleted and then reinstalled the dbc-backup-2 directory via ftp
    3.Disabled the plugins directory by renaming it

    ...and the error still remains

    The only thing left for me to try is this code someone posted on wordpress forums claiming he had solved this problem by inserting the following code to the wp-config.php file:

    <?
    //dont use header function in wordpress-wp_signup.php
    global $domain;
    global $path;
    //change urlnew variable as per requirment
    $urlnew = "http://".$domain.$path."/wp-admin/admin.php; 
    
    echo "<script>";
    echo "location = '$urlnew';";
    echo "</script>";
    echo $urlnew;
    ?>

    but I am reluctant to add code as I am not familiar with html or php, do not exactly understand how this code functions, do not have detailed instructions where to place it exactly and most of all just because inserting new code on top of a broken one doesn't seem to be good idea. Any suggestions?

    I have read more than 50 posts on this topic and the problem seems to be with contradicting code in wordpress, printing output (text) to the browser, but then for some reason redirecting the user (with wp_redirect) away from that page before the whole page is rendered.

    Do you have clue which part of the plugin might have caused this? I mean it didnt install correctly as immediately after I installed it in the admin panel i got logged out with the eroor message mentioned above.

  4. Damien Saunders
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Squid

    Suggest you FTP to your site and rename themes folder to themes.old and create a new folder called themes

    You should now be able to get to wp-admin and you can then install the WordPress Twenty Eleven theme and check that everything is working fine.

    BTW ... one of the most common issues you can have with WordPress are from themes, using old themes or making changes to your theme files.

    HTH

    Damien

  5. Squid
    Member
    Posted 1 year ago #

    Didn't help. Disabling plugin and theme directories didn't help. What about that code to disable the header function in sign up? I assume it does no harm to the site as it apparently only applies for the sign up page? Alternatively, I found this post for another thread concerning this issue and for another way around this predicement:

    "Your theme is printing output (text) towards the browser, however for whatever reason WordPress is redirecting the consumer (with wordpress_redirect) from that page prior to the whole page is made. You cannot start printing output after which redirect, or you will get the mistake the thing is. That is what Paul Muck was bothering in the comment.

    Ken Whitened said having a reference a publish having a similar problem. I have fixed this during my own experience by loading the creation of the script.

    Inside your theme's functions.php file (which will get incorporated each time your theme's pages load), put:

    view plaincopy to clipboardprint?

    01.//allow redirection, even if my theme starts to send output to the browser
    02.add_action('init', 'do_output_buffer');
    03.function do_output_buffer() {
    04.        ob_start();
    05.}

    Now, even when a part of your theme begins to transmit input the the browser, PHP will not send that text before the page is fully loaded, which enables WordPress to redirect customers if required included in its very own logic."

    My only problem with both of these codes is that I do not know where to put them exactly.

  6. Squid
    Member
    Posted 1 year ago #


  7. Squid
    Member
    Posted 1 year ago #

    I got it fixed. It was BOM which couldn't be detected or fixed with notepad, notepad++ nor Html Tool Kit. I am not sure if my swedish UTF preferences has something to do with it. Anyways, I found the bugger by opening the config.php file in c-panel and with ANSI (1983) out of sheer desperation. Had to download Hex Editor XVI32 to rid of it.

  8. Damien Saunders
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for letting me know ... so it was nothing to do with the DBC Backup 2 plugin.

    As a piece of advice, as you seem new to WordPress ... you should follow the cardinal rule ... which is never change WordPress core files because the next time WordPress runs a core update you may find that your changes in core files are deleted.

    Good Luck :)

    Damien

  9. Grannyberry
    Member
    Posted 1 year ago #

    Just a heads up! I had installed DBC Backup 2 on my sites. After one of my sites was hacked and DBC automatically backed up the hack I decided to try a different approach and so I deactivated and deleted DBC2 on both sites but left the backup files of the unhacked site in place. Wordfence security has recently alerted me to suspicious activity on this (previously clean) site and I found the malicious code in the DBC directory. I deleted the whole directory from my site via control panel but I still have many, many hits (mainly from China) trying to access my site through that bogus file. Is this a possible hole in DBC Backup 2?? The makers of this plugin need to take a look. I don't want to say the plugin is bad! I just want to let you know what happened to me.

  10. Damien Saunders
    Member
    Plugin Author

    Posted 1 year ago #

    @Grannyberry ... Sorry to hear this ...

    First, where did you download DBC Backup 2 plugin from please? If it wasn't on WordPress.org then I am very concerned

    As DBC Backup 2 just creates a backup of your SQL database to your webserver - no userID, passwords or anything personal to you is stored by this plugin.

    At first glance, it would seem that someone hacked into your site and saved the code into my plugin directory - just to hide it there from you.

    I'd very happy to look at this further ... can you contact me directly via my website wordpress.damien.co

    Thanks

    Damien

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic