PDA

View Full Version : Configuration can't be read with impex/help.php


PitchouneN64ngc
Wed 24th Sep '08, 2:51pm
I have this message when I would like to clean my importation :


ImpEx can not read the target database details from impex/ImpExConfig.php OR ../includes/config.php.
Please enter the target database details in ImpExConfig, or run ImpEx installed opposed to standalone.

In code (help.php), I can see this:

define('IDIR', (($getcwd = getcwd()) ? $getcwd : '.'));
...
else if (file_exists(IDIR . 'includes/config.php') AND !$impex_config)
This is the reason why I have this message. It tries to check config.php from impex directory and not from forum root.

Jerry
Tue 30th Sep '08, 4:13pm
Are the target details in your ImpExConfig.php ? Or you're just using cleaner for a clean up and the rest of ImpEx isn't there ?

PitchouneN64ngc
Tue 30th Sep '08, 5:12pm
ImpExConfig.php have default target values, so it uses vBulletin values in config.php.

IDIR defines the absolute path to the impex directory. And as I have written above, ImpEx ins installed in vBulletin (using the Import menu in Admin Control Panel).

The help.php exists, modifying
else if (file_exists(IDIR . 'includes/config.php') AND !$impex_config)by
else if (file_exists(IDIR . '../includes/config.php') AND !$impex_config)Fix this bug (but isn't a good fix).

I suggest to use a new IDIR with a chdir('./../'); before when ImpEx uses the values in config.php file.