Page 1 of 3

Microblogging plugin giving errors on save

Posted: Thu Aug 20, 2009 1:20 pm
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:

Re: Microblogging plugin giving errors on save

Posted: Thu Aug 20, 2009 10:46 pm
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).

Re: Microblogging plugin giving errors on save

Posted: Sat Aug 22, 2009 4:10 am
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.

Re: Microblogging plugin giving errors on save

Posted: Mon Aug 24, 2009 10:07 am
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

Re: Microblogging plugin giving errors on save

Posted: Mon Aug 24, 2009 8:49 pm
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.

Re: Microblogging plugin giving errors on save

Posted: Tue Aug 25, 2009 9:05 am
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

Re: Microblogging plugin giving errors on save

Posted: Tue Aug 25, 2009 10:35 am
by blog.brockha.us
Is the 500 error produced while downloading / installing the new version or while running it?

Re: Microblogging plugin giving errors on save

Posted: Tue Aug 25, 2009 10:02 pm
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

Re: Microblogging plugin giving errors on save

Posted: Tue Aug 25, 2009 11:04 pm
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

Re: Microblogging plugin giving errors on save

Posted: Wed Aug 26, 2009 2:35 pm
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.

Re: Microblogging plugin giving errors on save

Posted: Wed Aug 26, 2009 3:18 pm
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

Re: Microblogging plugin giving errors on save

Posted: Wed Aug 26, 2009 4:17 pm
by blog.brockha.us
hmm.. I have to look, if I can change these limits. But I'll give it a try.

Re: Microblogging plugin giving errors on save

Posted: Thu Aug 27, 2009 10:02 am
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

Re: Microblogging plugin giving errors on save

Posted: Thu Aug 27, 2009 10:03 am
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

Re: Microblogging plugin giving errors on save

Posted: Thu Aug 27, 2009 10:13 am
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