HI David,
I'm working on a new site, which is hosted on a direct admin server. I'm trying to get the automation proces in order. The feed downloading part i managed to get working, but i'm running in some problems with the import part.
Because of the direct admin part i have to use absolute paths for the cron jobs.
I have replaces of relative links to the import.php scripts
require("/home/****/public_html/includes/common-cronjobs.php");
require("/home/****/public_html/includes/admin.php");
require("/home/****/public_html/includes/filter.php");
require("/home/****/includes/MagicParser.php");
and i made a copy of common.php especially for the cronjobs called common-cronjobs.php in which i made all paths absolute:
require("/home/****/public_html/config.php");
require("/home/****/public_html/config.advanced.php");
require("/home/****/public_html/includes/javascript.php");
require("/home/****/public_html/includes/tapestry.php");
require("/home/****/public_html/includes/translate.php");
require("/home/****/public_html/includes/database.php");
In config.advanced.php i made the path to feeds also absolute:
$config_feedDirectory = "/home/****/public_html/feeds/";
When i try to run the import script with @MODIFIED - The feedback i get is
backfilling reviews...
backfilling reviews...[done]
And nothing has changed
When i try to run the import script with @ALL - The feedback i get is
backfilling reviews...
backfilling reviews...[done]
And nothing has changed
When i try to run the import script with a specific file (a xml file with 1 product) - The feedback i get is
importing iBood.xml...[0/1]
importing iBood.xml...[done]
backfilling reviews...
backfilling reviews...[done]
And the product is not imported.
I suspect there is one relative path left somewhere but i cant find it. Do you have an idea?
Regards,
B.
Hi David,
You mean these. They are already abosolute (i changed the common.php to have also the absolute paths)
require("/home/****/public_html/includes/common-cronjobs.php");
require("/home/****/includes/admin.php");
require("/home/****/filter.php");
require("/home/****/MagicParser.php");
regards,
B.
Hi,
That looks fine, what I would suggest next is turning on full warnings
and PHP error message display which might reveal more. At the top of
your common-cronjobs.php file, try adding this:
ini_set("display_errors","on");
error_reporting(E_ALL);
Cheers,
David.
--
PriceTapestry.com
Hi David,
Got a usefull error:
Notice: Undefined variable: admin_checkPassword in
/home/****/public_html/includes/admin.php on line
539
I quess it is this part:
if ($admin_checkPassword)
{
if ($config_adminPassword)
{
$remoteAddr = (isset($_SERVER["REMOTE_ADDR"])?$_SERVER["REMOTE_ADDR"]:"");
if ($_COOKIE["admin"] <> md5($remoteAddr.$config_adminPassword))
{
header("Location: login.php");
}
}
}
Regards,
B.
Hiya,
That shouldn't actually have caused any problem and would be expected; however the warning can be suppressed in scripts/import.php by replacing inserting the following code before the call to require includes/admin.php:
$admin_checkPassword = false;
What I would do next is edit includes/admin.php Look for the call to MagicParser_parse() (line 447 in the distribution), and then immediately after that add this code:
print MagicParser_getErrorMessage();
print "\n".$config_feedDirectory.$admin_importFeed["filename"];
print "\n";
This will indicate whether Magic Parser had a problem opening the feed, and exactly what filename was being used...
Cheers,
David.
--
PriceTapestry.com
Hi,
There are 4 includes at the top of scripts/import.php (lines 5-11) that probably need to be made absolute also, although I would have expected error messages rather than just "nothing happening" so if that's not it let me know and I'll investigate further...
Cheers,
David.
--
PriceTapestry.com