Page 1 of 1

HELP!!! Amazon-Plugin makes trouble!

Posted: Thu Jun 08, 2006 11:52 pm
by stm999999999

I play around in my test-blog and the amazon-plugin makes much trouble!

Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/s9y-additional_plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php on line 100


Notice: in /usr/local/lib/php/s9y-supersized/bundled-libs/PEAR.php on line 848

And the same error in the plugin-page, so I cannot delete the plugin!

Posted: Fri Jun 09, 2006 10:31 pm
by jhermanns
hmmm weird - the plugin is at the newest revision.

Posted: Fri Jun 09, 2006 11:19 pm
by garvinhicking

sounds like network connection problems to me -- the amazon server seems to return no resultset. At least the PEAR error suggests connection issues.


Posted: Sat Jun 24, 2006 3:19 pm
by stm999999999
I dont think it is a network-problem:

1) the error

invalid argument supplied for foreach() in /usr/local/lib/php/s9y-additional_plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php on line 100

dont sounds like this and

2) the error occurs in the admin-panel, too!?

And I cannot delete these plugin because the the "Configure Plugins"-page end interrupted with this error.

@Jannis: Please, could you delete the plugin in mein-test?

Posted: Sun Jun 25, 2006 5:05 am
by judebert
OK, I looked in the plugin. That line says:

Code: Select all

foreach ($articleinfo as $article) {

I checked $articleinfo. I'm not quite certain how it's getting set, although at one point it does get set through amazon_fetch(). In any case, it winds up as part of the plugin's configuration. It should be saved across invocations.

It can be emptied, causing this error, if $info_asin doesn't match $config_asin. But $info_asin gets saved to $config_asin whenever you make changes, so the error shouldn't crop up more than once.

In short, it looks like there's a problem with amazon_fetch(), causing an empty $articleinfo array, causing the error "Invalid argument supplied for foreach()". That could very well be a network error, just like Garvin said.

You could try to change the ASIN you have configured in the plugin configuration. Even changing it to an arbitrary value, saving, and returning it to the original value should work.

Posted: Sun Jun 25, 2006 4:06 pm
by stm999999999
Thanks for your answer.

But I cannot change anything because the on the Configure Plugins page the page interrupts! After some plugins it comes

"Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/s9y-additional_plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php on line 100

Notice: in /usr/local/lib/php/s9y-supersized/bundled-libs/PEAR.php on line 848"

and then the page is at its end! There is noch "delete", there is no possibility to change the amazon-plugin! :-(

Posted: Sun Jun 25, 2006 7:12 pm
by hernanrodriguez
Well....i get same error like stm9999 told.
This happen to me when i try to install any plugin or some themes.

Code: Select all

Intentando acceder al URL package_event_es.xml...
Descargandos 193802 bytes desde un archivo ya existente en tu servidor. Guardando el archivo como /home/herchoid/public_html/templates_c/package_event_es.xml...

Intentando acceder al URL serendipity_plugin_geotag.php?rev=1.9999...
No route to host
Notice: No route to host in /www/herchoid/public_html/bundled-libs/PEAR.php on line 848
No route to host

Anyone knows what is the problem. I have Serendipity 1.0-beta3.

Posted: Sun Jun 25, 2006 8:25 pm
by hernanrodriguez
People, when i finally update to V1.0 (final release) i can fix the problem i tell you previously.

PD: My ENG is some bad. Sory :o

Posted: Mon Sep 04, 2006 6:09 pm
by liora
I'm getting this same error any time anyone tries to leave a comment or when I try to ping sites like technorati.

Evidently this is a bug that keeps coming up, as I see others on this forum mentioning the line 848 thing repeatedly. Hope it gets fixed very soon.

Posted: Mon Sep 04, 2006 9:15 pm
by garvinhicking

Sadly line 848 is a generic error handler from the PEAR library. Any error that happens in one of the other PEAR files and is not specifically caught will end up at that line 848. It most surely is a problem with your file permissions or with a firewall, not with the file(s) themselves.

Best regards,

Posted: Tue Oct 17, 2006 10:09 pm
by kickoff3pm
Fugging hell this has mucked up my whole site, I can't get rid of it

Warning: Invalid argument supplied for foreach() in /home/yxwiwiyc/public_html/tributes/dev/plugins/serendipity_plugin_amazon/serendipity_plugin_amazon.php on line 100

Notice: Success in /home/*****/public_html/tributes/dev/bundled-libs/PEAR.php on line 848

I've just spent a lot of time setting up this site and the last thing I added was this now I'm stuck. Can anyone tell me how I can uninstall this without having the option in the admin section to it ?


Posted: Tue Oct 17, 2006 10:15 pm
by judebert
That's bad. Sorry it happened to you.

This post explains that you'll have to access your database and remove the plugin from the serendipity_plugins table. Your hosting company should provide some tool for you to edit the database directly, like phpMyAdmin or similar.

Posted: Tue Oct 17, 2006 10:24 pm
by judebert
If I'm reading the code correctly, this can only happen if you haven't specified any ASINs to recommend in the plugin configuration.

You should still be able to access your Admin page as serendipity_admin.php. If you can then use "Configure Plugins" to reconfigure the Amazon plugin, you should get it to work.

That's also the recommended way to remove the plugin, if you still want to.

Posted: Tue Oct 17, 2006 11:18 pm
by kickoff3pm
That is from the admin section -->plugins

Can't beleive this would be up available to install with no error checking or escape clauses.

I suspect the only way out oft his is enter thought the database and change the setting there.

Does this happen a lot with Serendipty, I mean I no you get what you pay for but this is an app killer if people are coding like this.

EDIT ---

If anyone else runs into this, my solution was to go into the database and first copy `****_plugins` then delete the two fields in that table that mentions Amazon.

Posted: Wed Oct 18, 2006 12:52 am
by mgroeninger
I could not replicate the plugin rendering the plugin configuration un-usable, but I was able to replicate the error on the main page.

I submitted a fix to CVS, with a version bump to 1.7.