diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 1f1aaba3..ab151aae 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -179,6 +179,12 @@ class CalDAVRequest if ( substr($this->path,0,1) != '/' ) $this->path = '/'.$this->path; } + /* support php_fpm under Apache 2.4 */ + else if ( isset($_SERVER['REQUEST_URI']) && isset($_SERVER['SCRIPT_NAME'] ) ) { + if ( preg_match( '{^(.*?\.php)([^?]*)}', $_SERVER['SCRIPT_NAME'] ) ) { + $this->path = $_SERVER['REQUEST_URI']; + } + } else if ( $_SERVER['REQUEST_URI'] != '/' ) { dbg_error_log('LOG', 'Server is not supplying PATH_INFO and REQUEST_URI does not include a PHP program. Wildly guessing "/"!!!'); }