Getting and error - please help!
David,
I keep getting this error - Fatal error: Cannot redeclare magicparser_xml_starttag() (previously declared in /home3/theseat1/public_html/theshoppingspot/PT/includes/MagicParser.php:2) in /home3/theseat1/public_html/theshoppingspot/PT/includes/MagicParser.php on line 2
Can you please help me to understand what is going on?
Thanks
Matt
Hi David,
I figured out what it was. I had forgotten that I did add the API calls for ebay and amazon. I forgot to go back and add the ebay info to the ebay.php.
On a side question. I did configure the amazon.php per your instructions but I am not getting any amazon products. How should that work?
Thanks
Matt
Hi Matt,
If using both amazon.php and ebay.php on the same page, the best thing to do is replace in each file:
require("MagicParser.php");with:
require_once("MagicParser.php");Regarding amazon.php returning no results; first double check that there are results as the main Amazon website that you are associating with for the exact same keywords (search term if included in search.php, or product name if on products.php)
If still no results, carry out the following modification in order to be able to view the response from the API call which should indicate the problem. In amazon.php, look for the following code at line 133:
MagicParser_parse($url,"myAmazonRecordHandler","xml|ITEMSEARCHRESPONSE/ITEMS/ITEM/");...and REPLACE with:
$xml = file_get_contents($url);
print "<textarea cols='80' rows='4'>".htmlentities($xml)."</textarea>";
MagicParser_parse("string://".$xml,"myAmazonRecordHandler","xml|ITEMSEARCHRESPONSE/ITEMS/ITEM/");Cheers,
David.
Hello Matt,
This must be occurring within an /admin/ page as none of the user pages include MagicParser.php (unless you have already implemented an API module e.g. ebay.php or amazon.php) - could you please email me a link to the page causing the error and any password that you have set up for /admin/...
Cheers,
David.