|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-06-06 14:52 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 09:00:02 2026 UTC |
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....