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
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
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.
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]
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.
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.