500 internal server error on most pages.

(please excuse me if this has been posted more than once)

Our site has developed a problem I never saw before.
Our installation is SPIP 1.9.2 [8782]

In the public area, some of the rubriques (e.g. )are available, but most rubriques (e.g. ) and all articles are not available, with a 500 Internal Server Error.

The site has been working well for several months on the present hosting. After contacting support, they say the script is segmentation faulting (their message follows).

I checked the file permissions, and all the directories for the spip directories and subdirectories
/tmp /ecrire /oo /IMG /dist /config /local
and they are 755, with files in them at 644.

The private area is working fine. Any ideas?

Message from hosting company support:
Your script is segmentation faulting :

[root@gator303 /home/nswas/public_html]# sudo -u nswas php spip.php
Segmentation fault (core dumped)

[root@gator303 /home/nswas/public_html]# sudo -u nswas /usr/local/bin/php -a spip.php
Interactive mode enabled

Fatal error: Call to undefined function: (null)() in /home/nswas/public_html/ecrire/inc/utils.php on line 308

This seems to be a problem with the script itself :

// recuperer la base
$a = array_shift($url);
if (!$a) $a= ‹ ./ ›;

Hi,

the problem seems to occurs because of some difference between the
template files. what is the difference between working and non-working
templates ? Maybe it's only an include but this may help.

You have some plugin installed :
enviar_email(0.1),calendriermini(0.2),lettres(2.5),notifications(1.9),surcharges(1.1)
can you disable them, clear /tmp, and check if
http://nswas.org/rubrique1.html is working or not ?

If it works, you should activate them one by one to find the buggy plugin..

.Gilles
---

On 11/13/07, Howard Shippin <info@nswas.org> wrote:

(please excuse me if this has been posted more than once)

Our site has developed a problem I never saw before.
Our installation is SPIP 1.9.2 [8782]

In the public area, some of the rubriques (e.g.
http://nswas.org/rubrique22.html )are available, but most
rubriques (e.g. http://nswas.org/rubrique1.html) and all articles are not
available, with a 500 Internal Server Error.

The site has been working well for several months on the present hosting.
After contacting support, they say the script is segmentation faulting
(their message follows).

I checked the file permissions, and all the directories for the spip
directories and subdirectories
/tmp /ecrire /oo /IMG /dist /config /local
and they are 755, with files in them at 644.

The private area is working fine. Any ideas?

Message from hosting company support:
Your script is segmentation faulting :

[root@gator303 /home/nswas/public_html]# sudo -u nswas php spip.php
Segmentation fault (core dumped)

[root@gator303 /home/nswas/public_html]# sudo -u nswas /usr/local/bin/php
-a spip.php
Interactive mode enabled

Fatal error: Call to undefined function: (null)() in
/home/nswas/public_html/ecrire/inc/utils.php on line 308

This seems to be a problem with the script itself :

        // recuperer la base
        $a = array_shift($url);
        if (!$a) $a= './';
--
Howard Shippin

_______________________________________________
spip-en@rezo.net -
http://listes.rezo.net/mailman/listinfo/spip-en

My response follows to the message sent by Gilles Vincent on 13/11/2007
10:49:

Hi,

the problem seems to occurs because of some difference between the
template files. what is the difference between working and non-working
templates ? Maybe it's only an include but this may help.
  

Almost all pages use the same rubrique template, so I don't think that's it.

You have some plugin installed :
enviar_email(0.1),calendriermini(0.2),lettres(2.5),notifications(1.9),surcharges(1.1)
can you disable them, clear /tmp, and check if
http://nswas.org/rubrique1.html is working or not ?
  

I have deleted everything in /tmp, but the problem continues.
H.

Thanks,

--
  Howard Shippin

Howard,
can you rename .htaccess file for a moment just to test and rule out that it is not causing the error.

-Vitali

On Nov 13, 2007, at 7:23 AM, Howard Shippin wrote:

My response follows to the message sent by Gilles Vincent on 13/11/2007
10:49:

Hi,

the problem seems to occurs because of some difference between the
template files. what is the difference between working and non-working
templates ? Maybe it’s only an include but this may help.

Almost all pages use the same rubrique template, so I don’t think that’s it.

You have some plugin installed :
enviar_email(0.1),calendriermini(0.2),lettres(2.5),notifications(1.9),surcharges(1.1)
can you disable them, clear /tmp, and check if
http://nswas.org/rubrique1.html is working or not ?

I have deleted everything in /tmp, but the problem continues.
H.

Thanks,


Howard Shippin

<info.vcf>


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

My response follows to the message sent by Vitali Zhulkovsky on 13/11/2007 16:22:

Howard,
can you rename .htaccess file for a moment just to test and rule out that it is not causing the error.

Thanks for the suggestion, but I have just tried this, and there is no change.

I have now discovered some other problems. The "private area" of the site mostly works, but:

a. /ecrire/?exec=auteurs gets the 500 error too.
b. 2 author pages - who happen to be administrators - are unavailable. The others are. It is still possible to log in as these administrators or create new administrators. Just that the author pages of the two mentioned administrators are unobtainable. I have looked at the authors in the database via phpmyadmin, but don't notice anything strange.
c. Most articles are not available also from the private area. Sometimes there is a 500 error, sometimes just a blank page. Older articles, which have redirections to the pre-SPIP part of the site, can be opened in the private area.

I'm still continuing with my detective work to try to understand if there is any unifying characteristic of rubriques that work, versus those that don't work, and will try to see if I can see anything wrong with the database.

Any ideas, however remote they may be, are welcome.

Howard Shippin.

Hi,

On 11/13/07, Howard Shippin <info@nswas.org> wrote:

Thanks for the suggestion, but I have just tried this, and there is no
change.

I have now discovered some other problems. The "private area" of the
site mostly works, but:
a. /ecrire/?exec=auteurs gets the 500 error too.
b. 2 author pages - who happen to be administrators - are
unavailable. The others are. It is still possible to log in as these ...

I also met a 500 error when I migrated the website from one site to
another without modifying the configuration for thumbnails : The site
was configured for convert (imageMagick) which wasn't available on the
new server.

I also met such bug because of some plugins. Can you disable your
plugins, empty cache (through private area or /tmp) and check if
http://nswas.org/rubrique1.html still doesn't work ?

The cause of any 500 error if generally given in the php error file
(but I doubt you have access to it). You also may find information in
tmp/spip.log and tmp/mysql.log

.Gilles
---

administrators or create new administrators. Just that the author pages
of the two mentioned administrators are unobtainable. I have looked at
the authors in the database via phpmyadmin, but don't notice anything
strange.
c. Most articles are not available also from the private area.
Sometimes there is a 500 error, sometimes just a blank page. Older
articles, which have redirections to the pre-SPIP part of the site, can
be opened in the private area.

I'm still continuing with my detective work to try to understand if
there is any unifying characteristic of rubriques that work, versus
those that don't work, and will try to see if I can see anything wrong
with the database.

Any ideas, however remote they may be, are welcome.

Howard Shippin.

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

My response follows to the message sent by Gilles Vincent on 13/11/2007 18:48:

I also met a 500 error when I migrated the website from one site to
another without modifying the configuration for thumbnails : The site
was configured for convert (imageMagick) which wasn't available on the
new server.
  

But it's been working well for several months since the last transfer

I also met such bug because of some plugins. Can you disable your
plugins, empty cache (through private area or /tmp) and check if
http://nswas.org/rubrique1.html still doesn't work ?
  

I disabled the plugins, emptied the cache, emptied the /tmp directory, but no change.

The cause of any 500 error if generally given in the php error file
(but I doubt you have access to it). You also may find information in
tmp/spip.log and tmp/mysql.log
  

The hosting company has informed me about the script error, mentioned in my first message.

In /tmp there is a file mysql.log
It has a suspicious recurring entry "1109 Unknown table 'articles' in where clause"
The database has a table "spip_articles", though.

I'm only pretending to understand these things...

Howard Shippin.

On 11/13/07, Howard Shippin <info@nswas.org> wrote:

In /tmp there is a file mysql.log
It has a suspicious recurring entry "1109 Unknown table 'articles' in
where clause"
The database has a table "spip_articles", though.

Ok, here is the cause of the 500 error I think :
do you have additionnal information just before this line ?

I'm only pretending to understand these things...

I understand.

Another thing you can do is to upgrade your version spip1.9.2c to the
latest release (yes, it's still maintained and some bugs are corrected
: the last change was made only 5 days ago)

Your version (8782) is pretty old..

Changelog : http://trac.rezo.net/trac/spip/log/branches/spip-1.9.2

You can get the latest version here : http://files.spip.org/spip/SPIP-v1-9-2.zip

Hope it will correct your bugs,

.Gilles
---

Howard Shippin.

On 11/13/07, Howard Shippin <info@nswas.org> wrote:

My response follows to the message sent by Gilles Vincent on 13/11/2007
19:59:
Nov 13 11:55:34 79.181.104.30 (pid 7152) - SELECT COUNT(*) AS n FROM
`nswas_spip`.spip_articles AS objet, `nswas_spip`.spip_index AS rec
WHERE objet.id_article = rec.id_objet
AND rec.hash IN (0)
AND rec.id_table = 1 AND NOT ((articles.id_article = 213)OR (titre LIKE

'%213%')) GROUP BY objet.id_article

Nov 13 11:55:34 79.181.104.30 (pid 7152) 1109 Unknown table 'articles'

in where clause
...
Are you sure to have removed /tmp/spip.log before doing tests ?
Because your last log is from 11:55 and it was 19:59 when you send
your message..

that it's only an hypothesis : you may have write access problem or
maybe the server isn't correctly configurated for the timeset : you
can check it with
the command "date" in a shell.

.Gilles

My response follows to the message sent by Gilles Vincent on 13/11/2007 20:39:

  
My response follows to the message sent by Gilles Vincent on 13/11/2007
19:59:
Nov 13 11:55:34 79.181.104.30 (pid 7152)  - SELECT COUNT(*) AS n FROM
`nswas_spip`.spip_articles AS objet, `nswas_spip`.spip_index AS rec
WHERE objet.id_article = rec.id_objet
AND rec.hash IN (0)
AND rec.id_table = 1 AND NOT ((articles.id_article = 213)OR (titre LIKE
    
'%213%')) GROUP BY objet.id_article
  
Nov 13 11:55:34 79.181.104.30 (pid 7152) 1109 Unknown table 'articles'
    
in where clause
...
Are you sure to have removed /tmp/spip.log before doing tests ?
Because your last log is from 11:55 and it was 19:59 when you send
your message..
  

The server is in the US. But it doesn’t look like the MySQL log appears as often as other logs. The latest spip.log is from 12:58.
Earlier today I emptied /tmp completely, including the hidden files, and downloaded them.

The last bit in that mysql.log file was:

Nov 12 09:15:14 203.72.5.173 (pid 7066) - SELECT articles.id_article, articles.lang
FROM nswas_spip.spip_articles AS articles
WHERE ((articles.id_rubrique IN (?))) AND NOT((articles.id_rubrique = ‹ 197 ›)) AND NOT((articles.titre REGEXP ‹ [1]+. ›)) AND (LEAST((UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(articles.date))/86400, TO_DAYS(now())-TO_DAYS(articles.date), DAYOFMONTH(now())-DAYOFMONTH(articles.date)+30.4368*(MONTH(now())-MONTH(articles.date))+365.2422*(YEAR(now())-YEAR(articles.date))) < ‹ 3 ›) AND ((articles.id_article NOT IN (0))) AND (articles.statut = "publie") GROUP BY articles.id_article ORDER BY articles.date DESC Nov 12 09:15:14 203.72.5.173 (pid 7066) 1064 AND NOT((articles.id_rubrique = ‹ 197 ›)) AND NOT((articles’ at line 3


  1. 9 ↩︎

My response follows to the message sent by Gilles Vincent on 13/11/2007 19:59:

Another thing you can do is to upgrade your version spip1.9.2c to the
latest release (yes, it's still maintained and some bugs are corrected
: the last change was made only 5 days ago)
  

It was as simple as that. After upgrading, everything works again,

Thank you Gilles, and everyone,

Howard Shippin