Fix for case insensitivity bug in Apache 2.4.12 + PHP-FPM

With Apache 2.4.12, the FPM socket path is always considered as a
lowercase file path regardless of the used capitalization.
If Froxlor creates a socket file containing uppercase characters, Apache fails to find to the socket.
See https://bz.apache.org/bugzilla/show_bug.cgi?id=57968
This commit is contained in:
Johannes Feichtner
2015-09-15 23:07:02 +02:00
parent 0935a9c193
commit 1c4b88d014

View File

@@ -348,7 +348,7 @@ class phpinterface_fpm {
public function getSocketFile($createifnotexists = true) { public function getSocketFile($createifnotexists = true) {
$socketdir = makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir')); $socketdir = makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir'));
$socket = makeCorrectFile($socketdir.'/'.$this->_domain['loginname'].'-'.$this->_domain['domain'].'-php-fpm.socket'); $socket = strtolower(makeCorrectFile($socketdir.'/'.$this->_domain['loginname'].'-'.$this->_domain['domain'].'-php-fpm.socket'));
if (!is_dir($socketdir) && $createifnotexists) { if (!is_dir($socketdir) && $createifnotexists) {
safe_exec('mkdir -p '.escapeshellarg($socketdir)); safe_exec('mkdir -p '.escapeshellarg($socketdir));