[sync] umlaut problem

Jan Schneider jan at horde.org
Sat Jan 30 18:08:50 UTC 2010


Zitat von "Gregor G." <gregorprivat at gmail.com>:

> Jan Schneider schrieb:
>> You can put a
>> Horde::logMessage($_SERVER['CONTENT_TYPE'], __FILE__, __LINE__,  
>> PEAR_LOG_ERR);
>> somewhere in rpc.php and check what's being logged.
> Please excuse if this is a stupid question: Do i need to install and  
> include the PEAR Log class to do so or is lib/Horde/Log.php used for  
> this? Do i have to configure the logging of PEAR_LOG_ERROR somewhere  
> in Horde? Where will i find the log afterwards?
> I put your line in rpc.php right at the beginning, the log  
> (/tmp/horde.log) is at http://www.pastebin.org/pastebin.php?dl=84023:

You log file doesn't contain this log entry.

> /* Look at the Content-type of the request, if it is available, to try
> * and determine what kind of request this is. */
> Horde::logMessage($_SERVER['CONTENT_TYPE'], __FILE__, __LINE__,  
> PEAR_LOG_ERR);
> if (!empty($_SERVER['PATH_INFO']) ||
>    in_array($_SERVER['REQUEST_METHOD'], array('DELETE', 'PROPFIND',  
> 'PUT', 'OPTIONS'))) {
>    $serverType = 'webdav';
> } elseif (!empty($_SERVER['CONTENT_TYPE'])) {
>    if (strpos($_SERVER['CONTENT_TYPE'],  
> 'application/vnd.syncml+xml') !== false) {
>        $serverType = 'syncml';
>        /* Syncml does its own session handling. */
>        $session_control = 'none';
>        $no_compress = true;
>    } elseif (strpos($_SERVER['CONTENT_TYPE'],  
> 'application/vnd.syncml+wbxml') !== false) {
>        $serverType = 'syncml_wbxml';
>        /* Syncml does its own session handling. */
>        $session_control = 'none';
>        $no_compress = true;
>    } elseif (strpos($_SERVER['CONTENT_TYPE'], 'text/xml') !== false) {
>        $input = Horde_RPC::getInput();
>        /* Check for SOAP namespace URI. */
>        if (strpos($input,  
> 'http://schemas.xmlsoap.org/soap/envelope/') !== false) {
>            $serverType = 'soap';
>        } else {
>            $serverType = 'xmlrpc';
>        }
>    } elseif (strpos($_SERVER['CONTENT_TYPE'], 'application/json')  
> !== false) {
>        $serverType = 'jsonrpc';
>    } else {
>        header('HTTP/1.0 501 Not Implemented');
>        exit;
>    }
> } elseif (!empty($_SERVER['QUERY_STRING']) &&  
> $_SERVER['QUERY_STRING'] == 'phpgw') {
>    $serverType = 'phpgw';
> } else {
>    $serverType = 'soap';
> }
>
> if ($serverType == 'soap') {
>    if (!isset($_SERVER['REQUEST_METHOD']) ||
>        $_SERVER['REQUEST_METHOD'] != 'POST') {
>        $session_control = 'none';
>        $params['requireAuthorization'] = false;
>        if (Util::getGet('wsdl') !== null) {
>            $input = 'wsdl';
>        } else {
>            $input = 'disco';
>        }
>    } elseif (class_exists('SoapServer')) {
>        $serverType = 'PhpSoap';
>    }
> }
>
> Regards Gregor
>
> -- 
> Partykeller
> www.meineparty.at
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the sync mailing list