Commit fe31f306 authored by Bong Cosca's avatar Bong Cosca
Browse files

Work around Apache pre-2.4 VirtualDocumentRoot bug

parent 4040bac0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1473,6 +1473,12 @@ final class Base {
				'httponly'=>TRUE
			)
		);
		if (function_exists('apache_setenv')) {
			// Work around Apache pre-2.4 VirtualDocumentRoot bug
			$_SERVER['DOCUMENT_ROOT']=str_replace($_SERVER['SCRIPT_NAME'],'',
				$_SERVER['SCRIPT_FILENAME']);
			apache_setenv("DOCUMENT_ROOT",$_SERVER['DOCUMENT_ROOT']);
		}
		// Default configuration
		$this->hive=array(
			'AGENT'=>isset($headers['X-Operamini-Phone-UA'])?