Bug #67393 [Fbk->Opn]: Internal server error with DIRECTORY_SEPARATOR
| From: | sherif dot onion at gmail dot com | Date: | Sat, 07 Jun 2014 18:55:11 +0000 |
| Subject: | Bug #67393 [Fbk->Opn]: Internal server error with DIRECTORY_SEPARATOR | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186096@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67393&edit=1
ID: 67393
User updated by: sherif dot onion at gmail dot com
Reported by: sherif dot onion at gmail dot com
Summary: Internal server error with DIRECTORY_SEPARATOR
-Status: Feedback
+Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Debian Linux
PHP Version: 5.6.0beta4
Block user comment: N
Private report: N
New Comment:
Should have said - this occurs under apache web-server (not cli):
apache2 version 2.4.9-1
architecture amd64
I have replicated on another Debian Testing system (that one is running PHP 5.5.12+dfsg), however
after some fiddling new information has come to light:
I was using ISP config to manage the hosting and that was creating the apache vhost configs with
suexec/suphp.
If I simply create a 'vanilla' virtualhost without suexec and include the code in a file
(i.e. test.php) and navigate to that URL it works, if I use a site created with ISPConfig I get 500
- Internal Server Error.
I should stress at this point that EVERYTHING else works fine on the ISPCOnfig generated site (I
have been using the same site set up for over 3 years).
The difference between the site that errors and the one that does not is this (in the apache
virtualhost config for the site):
# suexec enabled
<IfModule mod_suexec.c>
SuexecUserGroup web1 client1
</IfModule>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# suphp enabled
<Directory /var/www/test>
<IfModule mod_suphp.c>
suPHP_Engine on
# suPHP_UserGroup web1 client1
suPHP_ConfigPath /var/www/conf/web1
AddHandler x-httpd-suphp .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-suphp
</IfModule>
</Directory>
I am not an expert on suexec - so not sure if there is something a bit flakey in the config - but
the same config is running everything else fine (I mean a codebase with 1000's of files) the
issue is only with the few lines of code (actually part of a 3rd party product elfinder).
As a workaround - I have patched the elfinder code from
'separator' => DIRECTORY_SEPARATOR
to
'separator' => '/'
which stopped the errors.
Hope that helps....
Previous Comments:
------------------------------------------------------------------------
[2014-06-07 14:45:16] tyrael@php.net
I can't reproduce the issue, does it also happen when including the test script from cli, or
only through the fastcgi/fpm sapi? (albeit I have no idea how could this be affected by the SAPI).
------------------------------------------------------------------------
[2014-06-06 14:52:05] sherif dot onion at gmail dot com
Description:
------------
A class that has DIRECTORY_SEPARATOR listed in a declared array causes internal server error.
Actually version 5.6.0beta3 (no option in drop down for this - but cannot find similar issue
reported/fixed, so assume still present in 5.6.0beta4.
Test script:
---------------
<?php
class e {
protected $options = array(
'separator' => DIRECTORY_SEPARATOR
);
}
Actual result:
--------------
The sample code will always produce an internal server error for me:
(Just including the file with this code in is enough).
Here's what the log looks like:
[Fri Jun 06 15:30:54.040993 2014] [fcgid:warn] [pid 19647] (104)Connection reset by peer: [client
x.x.x.x] mod_fcgid: error reading data from FastCGI server
[Fri Jun 06 15:30:54.041048 2014] [core:error] [pid 19647] [client x.x.x.x] End of script output
before headers: test2.php
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67393&edit=1