Hi David. Just got my site back up on a dedicated server. I'm testing the the site to make sure everything works. When I use php import.php @ALL, @MODIFIED, or filename at the command line it returns Usage: import.php |@ALL|@MODIFIED
I had the modified version od import.php. I changed it to the original distribution version now i get this:
php import.php 1800Contacts.xml
importing 1800Contacts.xml...[0/167]PHP Notice: Undefined index: SalePrice in /var/www/vhosts/domainname.com/httpdocs/includes/admin.php on line 226
Awhile back I did the modification to show the salesprice instead of price if there was a sale.
Hi Adrian,
A "PHP notice" shouldn't prevent the script from continuing - did it complete the import successfully? This does mean that warnings are turned up quite high on your server - you could change this by looking for the following line in php.ini:
error_reporting = E_ALL
(just search for "error_reporting" as it may not be E_ALL at the moment)
...and changing it to:
error_reporting = E_ERROR
If you're not sure where php.ini is located use the locate command:
$locate php.ini
(where $ is your command prompt)
If it's still not importing at all email me includes/admin.php and i'll see if this notice would indicate something further wrong with the modifications.
Have you tried using a clean install of Price Tapestry on your new server to make sure everything is working before incorporating the changes made on your previous host - as some of those were to get around the very weird things that were happening so should not be needed now on your dedicated server - it would be much better to start from clean...
Cheers,
David.
I'm not sure if it was importing. it just kept outputing PHP Notice: Undefined index: SalePrice in /var/www/vhosts/megashoppingonline.com/httpdocs/includes/admin.php on line 226 on the screen. It only has 187 products so it shouldn't take long to import. I'll turn off the warning and try it again. then I'll try a clean install and see how the site works.
I did a fresh install and ran the import.php script and got;
importing books.xml...[0/794397]PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/megashoppingonline.com/httpdocs/includes/database.php on line 21
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/megashoppingonline.com/httpdocs/includes/database.php on line 26
I got this warning but it looks like its importing. I'll let it run and see what happens. I changed error reporting to E_ERROR. With this setting would I still get PHP warning like this one?
Hi Adrian,
No, with E_ERROR this would not be displayed...
Cheers,
David.
Hi Adrian,
I know we modified import.php to workaround problems on your previous host - is this the original distribution version of import.php that you are using now? Could you make sure it's the latest version, and then try an invocation such as:
$php import.php @MODIFIED
(where $ is your command prompt)
Cheers,
David.