Microblogging plugin giving errors on save

Found a bug? Tell us!!
cmscritic
Regular
Posts: 18
Joined: Fri Feb 20, 2009 6:40 pm
Contact:

Microblogging plugin giving errors on save

Post by cmscritic »

I'm attempting to use the microblogging plugin with Backtweets.com enabled and whenever I save i get this error message :

Warning: Invalid argument supplied for foreach() in /home/mrcritic/public_html/plugins/serendipity_plugin_twitter/classes/TwitterPluginDbAccess.php on line 31

I'm not sure if this matters or how to further diagnose potential issues but I thought i'd check. :roll:
Mike Johnston
Senior Editor and Founder
CMS Critic
Linux Critic
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by blog.brockha.us »

Thanks for the report!

This looks, as if the needed tables are not installed. Did you saved your configuration once? Can you look into your database wether there is a table ['dbPrefix']}tweetbackhistory?

Or, if the table is there, but never a tweetback was found before, try this one: You'll find this code in the php file mentioned in the error message:

Code: Select all

    function find_highest_twitterid() {
        global $serendipity;
        $query = "SELECT lasttweetid FROM {$serendipity['dbPrefix']}tweetbackhistory";
        $rows = serendipity_db_query($query);
        $highest_id = "0";
        foreach($rows as $row) {
            $id = $row['lasttweetid'];
            if ("$id" > "$highest_id") $highest_id = "$id";
        } 
        return $highest_id;
    }
replace it with this (one line added):

Code: Select all

    function find_highest_twitterid() {
        global $serendipity;
        $query = "SELECT lasttweetid FROM {$serendipity['dbPrefix']}tweetbackhistory";
        $rows = serendipity_db_query($query);
        if (!is_array($rows)) return "0";
        $highest_id = "0";
        foreach($rows as $row) {
            $id = $row['lasttweetid'];
            if ("$id" > "$highest_id") $highest_id = "$id";
        } 
        return $highest_id;
    }
This should help for the start. After this try, if you are getting tweetbacks.

I will send an update soon, that fixes this.

Later: Added Version 1.14 to Spartacus and into the files area of my blog, that fixes this (and some more problems).
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Wolfdog
Regular
Posts: 10
Joined: Mon Nov 17, 2008 9:49 am
Location: USA
Contact:

Re: Microblogging plugin giving errors on save

Post by Wolfdog »

When I went to update the twitter/microbloging plugin it gave me a 500 internal server error. so i deleted the plugin and the error went away, so i decided to try and install the plugin again same 500 error.
I have been using the plugin for a long time with out issues, so any help would be greatly appreciated.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by garvinhicking »

Hi!

Could you try to download the plugin manually from http://spartacus.s9y.org/ and see if it then works?

A HTTP 500 error can mean multiple things, it might be that your server's PHP is creating a fatal error. Do you have access to the CGI Error logs, or could ask your provider for them?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Wolfdog
Regular
Posts: 10
Joined: Mon Nov 17, 2008 9:49 am
Location: USA
Contact:

Re: Microblogging plugin giving errors on save

Post by Wolfdog »

I did download from the url and uploaded it, etc. I still got the same error. Or rather lack there of an error. Could you explain what logs i need and where to find thus logs, thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by garvinhicking »

Hi!

Yes, you need the "CGI Error-Logs", which is where apache stores error messages coming from an external PHP thread. This is NOT the usual HTTP error_log that Apache keeps. You will need to contact your hoster to get access to this file, usually. Where the files are stored depends on your provider's setup.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by blog.brockha.us »

Is the 500 error produced while downloading / installing the new version or while running it?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Wolfdog
Regular
Posts: 10
Joined: Mon Nov 17, 2008 9:49 am
Location: USA
Contact:

Re: Microblogging plugin giving errors on save

Post by Wolfdog »

I get the error when installing it. In the plugin list I click install and it almost finishes then causes an internal error for my whole site. I then manually have to delete the plugin from the plugin folder through ftp to get the error to go away.
As for the logs, I don't use a hosting company, I own the VPS, I use lighttpd/1.4.19
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by garvinhicking »

Hi!

Yes, this most probably means that the file itself is causing a PHP parse error on your install. Can you configure lighttpd for CGI error logs?

For Apache this is the "ScriptLog" directive.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by blog.brockha.us »

The 500 problem is reported now by many sites.. :( It is not reproducable on mine. But I'm trying to find it and hope to fix it soon.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by garvinhicking »

Hi!

Maybe time limits or ressource limits (RAM) are exceeded? You could try that by setting yours to maybe 8MB RAM adn 30 seconds executiontime=

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by blog.brockha.us »

hmm.. I have to look, if I can change these limits. But I'll give it a try.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Mela
Regular
Posts: 17
Joined: Sat Dec 17, 2005 7:45 pm
Location: Karlsruhe, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by Mela »

Same problem here. Wrecked the whole blog and it took me quite some time to determine _which_ newly updated plugin caused the trouble.

So it would be really really nice if you could just remove the buggy update from the repository.

Slightly annoyed,

Mela
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by garvinhicking »

Hi Mela!

Did you happen to be able to get a hold of the CGI error logs? This is really important for us as we cannot reproduce your issues and really NEED the logs to no longer stumble in the dark.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Mela
Regular
Posts: 17
Joined: Sat Dec 17, 2005 7:45 pm
Location: Karlsruhe, Germany
Contact:

Re: Microblogging plugin giving errors on save

Post by Mela »

Unfortuately the logs wheren't talkative:

httpd-error_log:

Code: Select all


[Thu Aug 27 09:41:07 2009] [notice] child pid 28685 exit signal Illegal instruction (4)
[Thu Aug 27 09:41:12 2009] [notice] child pid 72757 exit signal Illegal instruction (4)
[Thu Aug 27 09:41:13 2009] [notice] child pid 72762 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:02 2009] [notice] child pid 72784 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:02 2009] [notice] child pid 72781 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:07 2009] [notice] child pid 72786 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:09 2009] [notice] child pid 72765 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:10 2009] [notice] child pid 72782 exit signal Illegal instruction (4)
[Thu Aug 27 09:43:10 2009] [notice] child pid 72779 exit signal Illegal instruction (4)



mela.de-error_log:

Code: Select all

[Thu Aug 27 09:40:57 2009] [error] [client 72.30.142.221] File does not exist:
/var/www/mela.de/data/archives/1070-Die-Jungen-Liberalen-und-die-Konkurrenz.htm
l
[Thu Aug 27 09:40:57 2009] [error] [client 72.30.142.221] File does not exist:
/var/www/mela.de/data/archives/1070-Die-Jungen-Liberalen-und-die-Konkurrenz.html
[Thu Aug 27 09:41:11 2009] [error] [client 66.249.85.2] File does not exist: /var/www/mela.de/data/archives/696-Nur-ein-Tscht.html
[Thu Aug 27 09:41:12 2009] [error] [client 66.249.85.2] File does not exist: /var/www/mela.de/data/archives/696-Nur-ein-Tscht.html
[Thu Aug 27 09:41:34 2009] [error] [client 65.55.209.146] File does not exist:
/var/www/mela.de/data/archives/767-Weihnachts-Einkaufstipp-Buecher-fuer-Geeks-II.html
[Thu Aug 27 09:41:35 2009] [error] [client 65.55.209.146] File does not exist:
/var/www/mela.de/data/archives/610-Weihnachts-Einkaufstipp-Grafisches.html
[Thu Aug 27 09:41:35 2009] [error] [client 65.55.209.146] File does not exist:
/var/www/mela.de/data/archives/285-Gruende-nicht-mehr-bei-Hewlett-Packard-zu-kaufen-Teil-1.html


php-error.log:

nothing
Post Reply