summaryrefslogtreecommitdiffstats
path: root/remote.php
diff options
context:
space:
mode:
authorBlackEagle <ike.devolder@gmail.com>2012-05-25 21:08:04 +0200
committerBlackEagle <ike.devolder@gmail.com>2012-05-25 21:08:04 +0200
commitc704e8077f40c41c02f0a1644ca84b9b0605dc11 (patch)
treed39d380cea0d0fe35df21ba9bc699ff5956c77d0 /remote.php
parentdfd5a9759c591ed92d5e55c59ca98afbb35eed7d (diff)
downloadnextcloud-server-c704e8077f40c41c02f0a1644ca84b9b0605dc11.tar.gz
nextcloud-server-c704e8077f40c41c02f0a1644ca84b9b0605dc11.zip
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>
Diffstat (limited to 'remote.php')
-rw-r--r--remote.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/remote.php b/remote.php
index 44b85f762f5..63a45321eb0 100644
--- a/remote.php
+++ b/remote.php
@@ -5,7 +5,7 @@ require_once('lib/base.php');
if (array_key_exists('PATH_INFO', $_SERVER)){
$path_info = $_SERVER['PATH_INFO'];
}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)) {
$pos = strlen($path_info);
@@ -22,4 +22,4 @@ $app=$parts[2];
OC_App::loadApp($app);
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
-require_once(OC::$APPSROOT . $file); \ No newline at end of file
+require_once(OC::$APPSROOT . $file);