remote.php :: use non apache-only env vars
- fixes following error when using nginx + php-fpm [error] *6568 FastCGI sent in stderr: "PHP message: PHP Warning: strpos(): Offset not contained in string in /some-path/owncloud/remote.php on line 10" Signed-off-by: BlackEagle <ike.devolder@gmail.com>
This commit is contained in:
parent
dfd5a9759c
commit
c704e8077f
|
@ -5,7 +5,7 @@ require_once('lib/base.php');
|
||||||
if (array_key_exists('PATH_INFO', $_SERVER)){
|
if (array_key_exists('PATH_INFO', $_SERVER)){
|
||||||
$path_info = $_SERVER['PATH_INFO'];
|
$path_info = $_SERVER['PATH_INFO'];
|
||||||
}else{
|
}else{
|
||||||
$path_info = substr($_SERVER['PHP_SELF'], strpos($_SERVER['PHP_SELF'], basename(__FILE__)) + strlen(basename(__FILE__)));
|
$path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME']));
|
||||||
}
|
}
|
||||||
if (!$pos = strpos($path_info, '/', 1)) {
|
if (!$pos = strpos($path_info, '/', 1)) {
|
||||||
$pos = strlen($path_info);
|
$pos = strlen($path_info);
|
||||||
|
@ -22,4 +22,4 @@ $app=$parts[2];
|
||||||
OC_App::loadApp($app);
|
OC_App::loadApp($app);
|
||||||
|
|
||||||
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
|
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
|
||||||
require_once(OC::$APPSROOT . $file);
|
require_once(OC::$APPSROOT . $file);
|
||||||
|
|
Loading…
Reference in New Issue