You are here:  » Error while importing datafeed - Feeds_import line 29...

Support Forum



Error while importing datafeed - Feeds_import line 29...

Submitted by Schahab on Tue, 2008-01-22 20:35 in

Hello,

If i want to import a datafeed, i get:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 21

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/hegbtnfd/wohh-shop/includes/database.php:21) in /www/htdocs/hegbtnfd/wohh-shop/admin/feeds_import.php on line 29

What's going on?

Submitted by support on Wed, 2008-01-23 12:12

Hi there,

I see that this is a site that has been running OK for some time, so it possibly indicates a transient database error.

I have uploaded a debug version of database.php to the support folder. Could you please extract database.php from the link below, and upload this to your /includes/ folder, making sure to overwrite the existing version.

database.zip

When the error occurs again, details of the query that was being performed and the MySQL error message will be displayed - if you could post these it will help to establish where the problem lies...

Cheers,
David.

Submitted by Schahab on Wed, 2008-03-05 17:34

Sorry for the hard delay, I was ill for a long time. I did what you said:

[SELECT COUNT(*) AS productCount FROM `products` WHERE merchant='Guna'][Table 'products' is marked as crashed and should be repaired]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 26

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/hegbtnfd/wohh-shop/includes/database.php:21) in /www/htdocs/hegbtnfd/wohh-shop/admin/feeds_import.php on line 29

Submitted by support on Wed, 2008-03-05 17:40

Hello Schahab,

That indicates that your MySQL database has become corrupted.

This can happen sometimes if, for example, the hard disk holding the database has a problem.

Assuming that the PHP user has sufficient privileges, you should be able to repair the table with the following script:

repair.php

<?php
  set_time_limit
(0);
  require(
"includes/common.php");
  
$sql "REPAIR TABLE `".$config_databaseTablePrefix."products`"
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Run this in your main Price Tapestry directory. It may take a few minutes to run.

Hope this helps,
Cheers,
David.