FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » datadump creation problem in 2.3.8  () 1 Vote
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
datadump creation problem in 2.3.8 [message #12184] Wed, 30 July 2003 20:47 Go to next message
morganw is currently offline  morganw   United States
Messages: 6
Registered: July 2003
Karma: 0
Junior Member
I apologize for not testing this in 2.5.0 or 2.5.1, but my attempted upgrade failed and I've only just been able to re-install 2.3.8 and import by datadump.

My system config is at the end of this message. I'm running this on a copy of Apache running in my home directory on port 8080 so I won't have to get root priviledge.

HTML docs are in /home/woodsonm/fud/apache/htdocs
The "forum data" directory is
/home/woodsonm/fud/apache/forum

I noticed that in the datadump file, images that go in the top level of the images subtree have paths that are fine, but images that go deeper are messed up.

For instance, one of the buttons, b_aleft.gif appears like this:

//b_aleft.gif//IMG_ROOT_DISK//64//

but one of the smiley icons looks like this:

//icon_nod.gif//IMG_ROOT_DISK/home/woodsonm/fud/apache/htdocs/images/smiley _icons//420//

In admimport.php, we find the usage of IMG_ROOT_DISK:

function resolve_dest_path($path)
{
$path = str_replace('IMG_ROOT_DISK', $GLOBALS['WWW_ROOT_DISK'].'images/', $path);
$path = str_replace('DATA_DIR', $GLOBALS['DATA_DIR'], $path);

return $path;
}

So it appears that the second line I quoted from my datadump is incorrect- it shouldn't include the path because IMG_ROOT_DISK handles that.

The way I worked around this is to run the import once and get everything in the root of the image subtree, then change the first line in resolve_dest_path to:

$path = str_replace('IMG_ROOT_DISK', '/', $path);

and get avatars/ custom_avatars/ forum_icons/ mime/ and smiley_icons/

It's possible the problem is with these lines (in a recursve call when $(keep_dir) is not empty from admdump.php's backup_dir function:

if( empty($keep_dir) )
$write_func($fp, '//'.$file.'//'.$key.'//'.$file_ln."//\n".$file_data."\n");
else
$write_func($fp, '//'.$file.'//'.$key.$curdir.'//'.$file_ln."//\n".$file_data."\n");

but I don't know PHP yet.

I'll have to see if there's a cvsweb interface to the source. I don't want to do the whole pserver thing....

-----------------------------------
System Configuration
PHP built On: SunOS svunix1 5.6 Generic_105181-34 sun4u
MySQL Version: 3.23.47-log
PHP Version: 4.3.1
Web Server: Apache/2.0.47 (Unix) PHP/4.3.1
WebServer to PHP interface: apache2filter
Forum Version: 2.3.8
Relavent PHP Settings: Safe Mode: OFF
Display Errors: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: OFF
Output Buffering: OFF
Disabled Functions: none
PSpell Support: No

Re: datadump creation problem in 2.3.8 [message #12185 is a reply to message #12184] Wed, 30 July 2003 21:15 Go to previous messageGo to next message
morganw is currently offline  morganw   United States
Messages: 6
Registered: July 2003
Karma: 0
Junior Member
Well, I relented & did the CVS thing. Had to see if this code had been changed.

Looks like this was chnaged in version 1.19 of admdump.php which was released in 2.5.0RC1 & later.

Any advice on how to test updating in a way that won't trash my real forum if it goes wrong (as the 2.3.8->2.5.0 did last night)?

I was able to install a clean 2.5.1, but datadump/import can't be done across versions, so the "upgrade" script has to work for me.

Re: datadump creation problem in 2.3.8 [message #12186 is a reply to message #12185] Wed, 30 July 2003 21:19 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can do a 'raw' backup. It's pretty simply actually.

Make a backup of the forum's data & web directories. Then make a backup (mysqldump) of the database. This way you can simply decompress the archive and import the data from the dump and have your old forum back in no time. But be sure you've backed up ALL forum files and all of the database data.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Table 's' was not locked
Next Topic: 2.5.1 "Last Post" in "Today's Visitors"
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 12:47:34 GMT 2024

Total time taken to generate the page: 0.02497 seconds