Error 500 on all static pages

Found a bug? Tell us!!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

Timbalu wrote:Could you find out what the suexec.log says exactly?
I don't have access to that. I'll ask if I can get it, but it's not something Uberspace explicitly offers.

Any ideas why this does not work on the dev blog (1.7-rc4, static page 4.01) with PHP 5.4.11, although it does work on the production blog (1.6.2, static page 4.00) with PHP 5.4.11?

They both have the same setup (fast-cgi), the only notable difference is (and this might be interesting) that the dev blog is running on a subdomain while the production blog is running on the root level. I remember we introduced something somewhere in 1.7 to make s9y installations work on Uberspace subdomains, maybe that's biting us in the ass here?

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

No, not really... (might be related to strict things) [did you try with production = true?]
Did Garvin already employ fixes for this in 1.7?
I remember him saying;
A suggestion I made before was to create a .htaccess file to set a php "auto_prepend_file" that points to a PHP file which sets $_SERVER['DOCUMENT_ROOT'] to the proper directory.
This could be on top of s9y rules in subdomains .htaccess:

Code: Select all

php_value auto_prepend_file "/full/path/to/html/subdomain/foo.php" 
foo.php

Code: Select all

<?php

echo  'testing..., if the document_root var points to the correct path: ';
echo $_SERVER['DOCUMENT_ROOT']; 

$_SERVER['DOCUMENT_ROOT'] = 'put the correct path in here';  or dirname(__FILE__);
?>
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

Timbalu wrote:No, not really... (might be related to strict things) [did you try with production = true?]
Just now. (That's $serendipity['production'] = true; in serendipity_config_local.inc.php, right?) Doesn't change anything in frontend output or log files. (Still waiting to hear about suexec.log.)
Timbalu wrote:Did Garvin already employ fixes for this in 1.7?
Yes. That's why I have a 1.7 dev blog in the first place. It's the first version which can be installed on a subdomain on Uberspace. I just don't remember what Garvin had to change for it to work there.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

It here
https://github.com/s9y/additional_plugi ... 77569256f6

I just made a test with a productive blog I maintain on uberspace. It has no subdomain, Serendipity 1.7-rc3 and staticpages with PHP 5.4.11 do work just well. So now we are getting closer....
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

Erm. That does something really weird on http://s9y.netzgestaltung.net/ … well, at least it doesn't throw a 500 any longer, but … well, you better see for yourself.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

Meanwhile, in the error.log …

Code: Select all

File does not exist: /var/www/virtual/<USER>/s9y.netzgestaltung.net/flash, referer: http://s9y.netzgestaltung.net/testseite.html
YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

Okay, so I downloaded the wrong file from GitHub (not raw). The display error is gone now, but unfortunately, the 500 error is back.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

Yeah, the raw one I posted on page one ;-)
the one I meant with Its here is this
https://github.com/s9y/Serendipity/comm ... e004bd6191
which is Garvins commit for the subdomain question, not the link I posted.
Sorry for the hassle...

But it keeps to be a question of subdomain handling... we should try to debug it. Could you put and execute the foo.php file in your subdomain dir (without the htaccess thing and the last set DOC_ROOT thing) and see what it tells you with the testing echo doc_root.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

So now we wait for Garvin to chime in on this?

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

No try to debug it (see above) with

Code: Select all

echo  'testing..., if the document_root var points to the correct path: ';
echo $_SERVER['DOCUMENT_ROOT']; 
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

You could also try and additional add:

Code: Select all

echo '$_SERVER['ORIG_PATH_TRANSLATED']: ' . $_SERVER['ORIG_PATH_TRANSLATED']."\n<br>";
echo 'realpath: '.realpath(rtrim(dirname($_SERVER['ORIG_PATH_TRANSLATED'], '/'))) . '/'."\n<br>";
//echo 'S9Y_DATA_PATH: '.S9Y_DATA_PATH;
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

– DOCUMENT_ROOT is /var/www/virtual/<USERNAME>/html
– ORIG_PATH_TRANSLATED is /var/www/virtual/<USERNAME>/s9y.netzgestaltung.net/foo.php
– realpath(rtrim … etc. is /var/www/virtual/<USERNAME>/s9y.netzgestaltung.net/
– S9YDATA_PATH should probably have a $ in front of it? If I add it, it's empty.

… and adding the last line gives me a 500 error, even if I add the correct DOCUMENT_ROOT.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Error 500 on all static pages

Post by yellowled »

So, news from Uberspace. I don't get an individual suexec.log, but it's pretty boring anyway. An excerpt of it shows tons of:

Code: Select all

uid: (698/<USER>) gid: (698/698) cmd: php-fcgi-starter
But they did look into another log file (which for some reason can not be split up into user log files that easily or something) and found this:

Code: Select all

error] mod_fcgid: process /var/www/virtual/netzg/fcgi-bin/php-fcgi-starter(22825) exit(communication error), get unexpected signal 11
That's why they assume that this is some sort of bug in PHP which s9y and/or the static page plugin triggers (accidentally). They suggest submitting a PHP bug report. Oh, and on the process resource monitor: yes, they do use a resource monitor, but not this one. But the RAM limit at which it does something is set much higher than the RAM limit for the PHP interpreter.

They also suggested to check every PHP version available, which I haven't done yet, to narrow down the specific PHP version which introduced this bug.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

yellowled wrote:– DOCUMENT_ROOT is /var/www/virtual/<USERNAME>/html
– ORIG_PATH_TRANSLATED is /var/www/virtual/<USERNAME>/s9y.netzgestaltung.net/foo.php
– realpath(rtrim … etc. is /var/www/virtual/<USERNAME>/s9y.netzgestaltung.net/
– S9YDATA_PATH should probably have a $ in front of it? If I add it, it's empty.

… and adding the last line gives me a 500 error, even if I add the correct DOCUMENT_ROOT.
Where does /s9y.netzgestaltung.net/ live in your uberspace environment?
Is the shown one the correct path, without /html/ ?
The last echo is a constant, which is set inside serendipity framework. I commented the echo, while you can access it only inside the first. You could try if it has some content in your 2k11 config.inc.

As you can see, the DOC_ROOT points to your root domain, so it might be necessary to do that already described htaccess thing to auto prepend the foo file which would set DOC_ROOT to its real folder... like to be realpath(rtrim(dirname($_SERVER['ORIG_PATH_TRANSLATED'], '/'))).
Did you have already tried this?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error 500 on all static pages

Post by Timbalu »

yellowled wrote:... suexec.log, ...excerpt of it shows tons of:

Code: Select all

uid: (698/<USER>) gid: (698/698) cmd: php-fcgi-starter
Still good to know, because there might have been other error notes.
Matthias, please ask the US support, if the difference in uid vs gid is correct. Shouldn't it be gid: (698/<USER>) also?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply