hi David,
quick question, im using an automation script to pull our list of feeds from a database (not PT database)
everything looks ok, front end wise, when i click a link to update said feed ie: tvs
the admin area will show import for that feed is green, ive been checking the error logs for the site and this is whats its showing.
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 18
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 27
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 32
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 51
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 18
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 27
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 32
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 51
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 18
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 27
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/database.php on line 32
[Wed Nov 17 12:23:01 2010] [warn] mod_fcgid: stderr: PHP Fatal error: Cannot redeclare tapestry_search() (previously declared in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/tapestry.php:2) in /var/www/vhosts/site.co.uk/httpdocs/gosee/includes/tapestry.php on line 7
from another post i seen that you run a few checks to make sure that mysql is working etc using
include($options['ptscriptdir']."includes/common.php");
$link = mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword)
or die("Database Error: " . mysql_error());
print "Using database server: ".$config_databaseServer."\n";
print "Using database username: ".$config_databaseUsername."\n";
print "Using database password: ".$config_databasePassword."\n";
so im unsure as to what could be causing the errors, and stopping the import.
when i click on the green text to import in the admin area, it works fine, just when im running the automation side of things
will update the feed, but not import it?
Cheers
M
Hi M,
What i'd guess is happening that as you are connecting to another database in your automation script, this connection is remaining open and the Price Tapestry database code is attempting to reuse it; but can't.
First thing to try to see if that is the problem is to make sure that a mysql_close() is called after your initial code to access your list of feeds. That should resolve it and Price Tapestry will establish its own connection...
Cheers,
David.
--
PriceTapestry.com