Backup mod doesnt work after update to 2.0.18

Advertise a phpBB hack or request help with an existing one.

Moderator: TerraFrost

Backup mod doesnt work after update to 2.0.18

Postby kulinar » Tue Nov 08, 2005 1:30 pm

After I updated my board to 2.0.18, backup mod doesn't work anymore. It doesn't give an error, but creates a small file (about 20 bytes) and that is all.
kulinar
Traveler
 
Posts: 3
Joined: Tue Nov 08, 2005 1:23 pm

Postby TerraFrost » Tue Nov 08, 2005 3:05 pm

I'll look into it when I get a chance :)
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby kulinar » Tue Nov 08, 2005 3:09 pm

Waiting...
kulinar
Traveler
 
Posts: 3
Joined: Tue Nov 08, 2005 1:23 pm

Postby TerraFrost » Thu Nov 10, 2005 1:57 am

The fix is to do this:

Code: Select all
#
#-----[ FIND ]---------------------------------------------
#
   @include($phpbb_root_path.'common.'.$phpEx);
#
#-----[ AFTER, ADD ]---------------------------------------
#
   include($phpbb_root_path.'config.'.$phpEx);

The problem is due to the fact that this was added to common.php as of 2.0.18:

Code: Select all
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);

Given this, I'd guess most (although not all) backup MODs would be afflicted.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby kulinar » Thu Nov 10, 2005 5:14 pm

TerraFrost wrote:The fix is to do this:
...........................................................
...........................................................
Works fine. I just wanted to add that I get the issue only when using manual backup. Automatic backups work fine.
kulinar
Traveler
 
Posts: 3
Joined: Tue Nov 08, 2005 1:23 pm

Postby superjoost » Tue Nov 22, 2005 10:32 pm

I have the exact same problem over here.
Which file do I have to edit?
The posting.php file?

Mine looks like this:

Code: Select all
<?php
/***************************************************************************
 *                                posting.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: posting.php,v 1.8 2004/11/30 17:13:40 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);


I've tried to put the replace code beneath the:
Code: Select all
include($phpbb_root_path . 'common.'.$phpEx)
line, only... It still doesn't work.

Do I have the wrong file, or am I doing something wrong?

Thanx in advance!
superjoost
Traveler
 
Posts: 2
Joined: Tue Nov 22, 2005 10:29 pm

Postby TerraFrost » Wed Nov 23, 2005 8:51 am

Sorry. It's backup.php you'd want to do that to.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby superjoost » Wed Nov 23, 2005 9:56 pm

thanx dude. it works perfect again!

:)
superjoost
Traveler
 
Posts: 2
Joined: Tue Nov 22, 2005 10:29 pm

Postby Handyman » Wed Jan 04, 2006 6:34 am

I have had the problem where the backup file is only 20 bytes in 2.0.17 and 2.0.19. I tried the fix listed above and it still comes out 20 bytes.
Also, the backup comes out 20 bytes when I manually do a backup and when it automatically backs up.

I also tried version 2, It has a error when backing up.

What to do?
Thanks

Merry Christmas and Happy New Year.
(8th day of christmas)
Handyman
Traveler
 
Posts: 3
Joined: Wed Jan 04, 2006 4:16 am

Postby TerraFrost » Thu Jan 05, 2006 9:59 am

I've actually sorta abandoned v2. PHP based backups, though they do have their advantages, are simply too slow and CPU intensive to be worthwhile, imho. Atleast using traditional schemes.

v1 isn't much better, however. Just looking at the code makes me cringe (it was the second PHP script I wrote). Unfortunately, my experiences with v2 has pretty much killed any interest I had in doing yet another rewrite.

Anyway, the following will probably fix your problem:

Find:
Code: Select all
      exec("mysqldump --opt -u $dbuser --password=$dbpasswd --host=$dbhost $dbname | gzip > " . $pathname . "$dbname.gz");


Replace with:
Code: Select all
      exec("mysqldump --opt -u $dbuser --password=\"$dbpasswd\" --host=$dbhost $dbname | gzip > " . $pathname . "$dbname.gz");


It's not due to a change phpBB 2.0.19 made, but rather, due to passwords that contain certain symbol characters
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby Handyman » Thu Jan 05, 2006 10:07 am

Hmmm. Still no change.
My password doesn't contain any symbols. Just numbers and letters, if that's what you were refering to.
Handyman
Traveler
 
Posts: 3
Joined: Wed Jan 04, 2006 4:16 am

Postby TerraFrost » Thu Jan 05, 2006 10:26 am

Well, I have no idea, then. It works for me.

Are you extra sure you did this?:

Code: Select all
#
#-----[ FIND ]---------------------------------------------
#
   @include($phpbb_root_path.'common.'.$phpEx);
#
#-----[ AFTER, ADD ]---------------------------------------
#
   include($phpbb_root_path.'config.'.$phpEx);

I ask because half the time I get FTP access, it turns out that people didn't actually install the MOD when they thought they had. (maybe they just edited the files locally and forgot to upload atleast some of them; I dunno)
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby Handyman » Thu Jan 05, 2006 10:29 am

Yes, I did that. I just had a though, My db username and the db name both contain a underscore. Would that effect it?
Handyman
Traveler
 
Posts: 3
Joined: Wed Jan 04, 2006 4:16 am

Postby TerraFrost » Thu Jan 05, 2006 6:11 pm

You could try putting both the username and password in quotes. The previous thing I suggested only put the password in quotes.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby odie3 » Sun Oct 15, 2006 3:26 pm

TerraFrost wrote:I've actually sorta abandoned v2. PHP based backups, though they do have their advantages, are simply too slow and CPU intensive to be worthwhile, imho. Atleast using traditional schemes.

v1 isn't much better, however. Just looking at the code makes me cringe (it was the second PHP script I wrote). Unfortunately, my experiences with v2 has pretty much killed any interest I had in doing yet another rewrite.


Really? Your Backup MOD is so very helpful! Currently I can not use the auto-backup [the code in posting.php] due to using Categories Hierarchy but at least I can hit the backup.php page and do it manually. That is far better/faster than using MyAdmin!

Heck, IMO auto-backup should be built into forum software [no matter the maker].

Thanks for the fix for this fic in backup.php!
Code: Select all
include($phpbb_root_path.'config.'.$phpEx);
odie3
Traveler
 
Posts: 37
Joined: Sun May 09, 2004 11:15 pm

Next

Return to phpBB Hacks and MODs

Who is online

Users browsing this forum: No registered users and 1 guest

cron