Empty response with PHP XMLRPC
"schlandi_a" <[email protected]>
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm using the PHP XMLRPC extension (system: Apache/1.3.33 (Unix),
PHP/5.0.3, mod_ssl/2.8.22, OpenSSL/0.9.6a). I attached the script at
the end. My problem is that the result is empty if the script runs
longer than 5 min. If the script runs less than 5 min it works fine.
"connection_status()" tells me that the script terminates normally.
Any ideas?
Thanks,
Andreas
<?php
set_time_limit(500);
register_shutdown_function("timeoutCatch");
$xmlServer = xmlrpc_server_create();
$log = fopen($filename);
fwrite($log, "Start: " . date("H:i:s") . "\n");
fflush($log);
function process() {
$result = ini_get('max_execution_time') . "\n";
$result = $result . date("H:i:s") . "\n";
sleep(450);
$result = $result . date("H:i:s") . "\n";
return $result;
}
function timeoutCatch() {
global $log;
fwrite($log, "End: " . date("H:i:s") . ": abortion caused by:
" . connection_status() . "\n");
fflush($log);
fclose($log);
}
xmlrpc_server_register_method($xmlServer, 'process', 'process');
$xmlRequest = $HTTP_RAW_POST_DATA;
$xmlResponse = xmlrpc_server_call_method($xmlServer, $xmlRequest, NULL);
fwrite($log, $xmlResponse);
fflush($log);
fclose($log);
echo $xmlResponse;
xmlrpc_server_destroy($xmlServer);
?>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xml-rpc/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/