You are here:  » Errors when trying to import

Support Forum



Errors when trying to import

Submitted by AD_Mega on Sun, 2010-07-18 00:06 in

I get this when I try to import.
I tried to recreate the database buy running setup.php but nothing shows when I browse to setup.php.

PHP Warning: set_time_limit(): Cannot set time limit in safe mode in {code saved} on line 8
importing clearance.xml...[0/0]PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in {code saved} on line 21
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in {code saved} on line 26
importing clearance.xml...[done]
importing Kmart.txt...[0/0]PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in {code saved} on line 21
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in {code saved} on line 26

Submitted by support on Sun, 2010-07-18 08:20

Hi,

I just went to your site and it does seem to be running OK and the database is working fine (I tried adding and removing a Featured Product); however the above output would indicate that something is wrong with the command line version of PHP installed on your server - it doesn't look like it has access to MySQL in the same way as the Apache module version of PHP.

What I will do is send you the debug version of database.php which will display the actual SQL error being generated and should indicate the problem...

Cheers,
David.

Submitted by AD_Mega on Sun, 2010-07-18 23:11

I uploaded the debug version of database.php and this is the errors I got.

PHP Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/megashoppingonline. com/httpdocs/scripts/import.php on line 8
importing clearance.xml...[0/0][SELECT * FROM `productsmap`][Table 'megashop_web.productsmap' doesn't exist]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 26
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 31
importing clearance.xml...[done]
importing Kmart.txt...[0/0][SELECT * FROM `productsmap`][Table 'megashop_web.productsmap' doesn't exist]P HP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhos ts/megashoppingonline.com/httpdocs/includes/database.php on line 26
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 31

Submitted by support on Mon, 2010-07-19 06:58

Hi Adrian,

That would indicate that for some reason, the `productsmap` table does not exist. It should be possible to recreate it using the following dbmod.php script (run from your main Price Tapestry installation folder)

dbmod.php

<?php
  
require("includes/common.php");
  
$sql "
CREATE TABLE `"
.$config_databaseTablePrefix."productsmap` (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL,
  alternates text,
  PRIMARY KEY  (id)
) TYPE=MyISAM;
"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

That should clear the error...

Cheers,
David.

Submitted by AD_Mega on Mon, 2010-07-19 10:18

Hi there also isn't a reviews table. Setup.php still shows nothing when I browse to it. I moved the site to a new server a few months ago. I ran the dbmod.php scrit and this is what I get when I try to import. No products are imported.

importing Home_and_Outdoor.tab...[0/298466][SELECT * FROM `feeds` WHERE filename='Home_and_Outdoor.tab'][MySQL server has gone away]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 26
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 31
importing Home_and_Outdoor.tab...[done]
importing Buy_com_USA_and_Buy_com_CA-Electronics.xml...[0/308137][SELECT * FROM `feeds` WHERE filename='Buy_com_USA_and_Buy_com_CA-Electronics.xml'][MySQL server has gone away]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 26
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 31
importing Buy_com_USA_and_Buy_com_CA-Electronics.xml...[done]

Submitted by support on Mon, 2010-07-19 10:43

Hi Adrian,

Would it be possible to have temporary FTP access so that I can check this out for you - I think there has obviously been a database crash on the server; I'll try and rescue everything without involving a full re-import for you...

Please email me the details if that would be OK...

Cheers,
David.