datadump creation problem in 2.3.8 [message #12184] |
Wed, 30 July 2003 20:47 |
morganw
Messages: 6 Registered: July 2003
Karma:
|
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
|
|
|