You are here:  » problem with import.php


problem with import.php

Submitted by kim on Sun, 2006-10-01 23:33 in

Hello,

i modified some tables in the database to add some extra information like shipping costs, delivery time and EAN. When i register a new feed via the admin panel and import the feed with the feeds_import.php everything works fine and the databaserecords on the table "feeds" and "products" holding all records as i wanted it....

now i want the feeds to autoimport and i set up a cronjob with the import.php but nothing happens. @ALL, @MODIEFIED or filename will not work.

Do you have a hint for me what files or functions i have to edit also?

feeds_import.php via http works fine. import.php via shell is not working...

Thank your for your help and greetings from hamburg
kim

Submitted by support on Mon, 2006-10-02 07:33

Hi Kim,

You shouldn't need to make any changes to import.php as pretty much all it does is call the admin_import() function in includes/admin.php - which is presumably where you have made the changes to incorporate the new fields.

What actually happens when you run the command? Is there any output generated by the script at all or does it just return straight to the command prompt without any output?

Do you see the following which is generated by the script?

backfilling reviews...[done]

Cheers,
David.

Submitted by kim on Mon, 2006-10-02 10:05

Hi David,

yes the script is giving some output. it's like this:

importing filename.xml...[0/1000]
importing filename.xml...[done]
backfilling reviews...[done]

in this example filename.xml is an already registered file which contains 1000 records... but the import.php imports nothing. and as i took a look to the database to "products" all productrecords of filename.xml are deleted.

Kim

Submitted by kim on Mon, 2006-10-02 10:32

Hi David,

i just solved my problem. in includes/admin.php at this line:

MagicParser_parse("../feeds/".$admin_importFeed["filename"],"admin__importRecordHandler",$admin_importFeed["format"]);

i changed the feeds directory to the full serverpath "/var/......./feeds/" and everything works fine :)).

Have a nice day

Kim