Good time of day. I tried the code that you gave. But I got a new
error:
Fatal error: Call to undefined method OC_App::getAppPath() in
/var/www/owncloud/remote.php on line 52
My owncloud version: 4.0.4.
But my problem helped solve the following code:
<?php
$RUNTIME_NOSETUPFS = true;
$RUNTIME_NOAPPS = TRUE;
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__)));
}
// begin modification
if (empty($path_info)){
$path_info =
str_replace($_SERVER['SCRIPT_NAME'],"",$_SERVER['REQUEST_URI']);
}
// end modification
if (!$pos = strpos($path_info, '/', 1)) {
$pos = strlen($path_info);
}
$service=substr($path_info, 1, $pos-1);
$file = OCP\CONFIG::getAppValue('core', 'remote_' . $service);
if(is_null($file)){
header('HTTP/1.0 404 Not Found');
exit;
}
$parts=explode('/',$file);
$app=$parts[2];
OC_App::loadApp($app);
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once(OC::$APPSROOT . $file);
Michael Gapczynski писал 01.07.2012 00:39:
Could you try the master branch or just replace remote.php with the
below
file. There are a few changes to how path info is retrieved.
https://gitorious.org/owncloud/owncloud/blobs/master/remote.php
Michael
On Sunday, July 01, 2012 12:11:01 AM [email protected] wrote:
Hi all.
Help me please.
In what may be the problem: Warning: strpos(): Offset not contained
in
string in /var/www/owncloud/remote.php on line 10 ?
PHP 5.3.14-1~dotdeb.0 with Suhosin-Patch (cli) (built: Jun 21 2012
00:51:58)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010
eAccelerator,
by eAccelerator
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins
GmbH
nginx/1.2.1
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud
!DSPAM:4fef63ff260068910511475!
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud