Re: [PHP] XML-RPC problem with long running times

2005-12-30 Thread Richard Lynch
If you can't get at the PHP internal time-out...

First, file a bug report "Feature Request" and ask for it to be
exposed.  You won't be the only one who needs it.

Second, for the short term, you may be stuck with rolling your own
XMLRPC interface, or using one of the others "out there" as raw PHP
that will perhaps give you more control of stream time limits.

You MIGHT be able to dig through PHP source and alter the time-out and
re-compile...  But remembering to do that on an upgrade would be a
PITA.

On Thu, December 29, 2005 8:58 am, Andreas Schlicker wrote:
> Of course, fflusch($log); should be fflush($log);
>
> I just found out that $xmlResponse really is empty.
> However, connection_status() returns 0, so I assume that the script is
> not interrupted by a timeout.
>
> Why does xmlrpc_server_call_method($xmlServer, $xmlRequest, NULL)
> return
> nothing if the call takes longer than 5 minutes and there is no
> interrupt? Is there some "special" XMLRPC timeout?
>
> Any idea?
>
> Andreas
>
>
> Andreas Schlicker schrieb:
>> Hi all,
>>
>> I'm using Apache/1.3.33 (Unix), PHP/5.0.3, mod_ssl/2.8.22,
>> OpenSSL/0.9.6a.
>>
>> I wrote a dummy script that is called by a Java program via XML-RPC,
>> waits for some time and replies the start and end times.
>>
>> > set_time_limit(500);
>> $xmlServer = xmlrpc_server_create();
>>
>> function process() {
>> $result = ini_get('max_execution_time') . "\n";
>> $result = $result . date("H:i:s") . "\n";
>> sleep(0);
>> $result = $result . date("H:i:s") . "\n";
>> return $result;
>> }
>>
>> xmlrpc_server_register_method($xmlServer, 'process', 'process');
>> $xmlRequest = $HTTP_RAW_POST_DATA;
>> $xmlResponse = xmlrpc_server_call_method($xmlServer, $xmlRequest,
>> NULL);
>>
>> #$log = fopen($filename, 'a');
>> #fwrite($log, $xmlResponse);
>> #fflusch($log);
>> #fclose($log);
>>
>> echo $xmlResponse;
>> xmlrpc_server_destroy($xmlServer);
>> ?>
>>
>> If the script sleeps for up to 5 minutes, it works perfectly fine.
>> However, I my real application will run probably an hour or so. If
>> the
>> script takes more than 5 minutes to execute, the client receives an
>> empty response, even the header is missing. If I try to write the
>> $xmlResponse to a file, the client receives a null message.
>>
>> I wrote a small script without XMLRPC that acted the same way when
>> called by a browser. This worked perfectly (I tested it up to 20
>> minutes
>> waiting time) even if I used set_time_limit(5) and sleep(500).
>>
>> Does anybody have an idea how to solve this problem? Thanks in
>> advance.
>>
>> Andreas
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML-RPC problem with long running times

2005-12-29 Thread Andreas Schlicker

Of course, fflusch($log); should be fflush($log);

I just found out that $xmlResponse really is empty.
However, connection_status() returns 0, so I assume that the script is 
not interrupted by a timeout.


Why does xmlrpc_server_call_method($xmlServer, $xmlRequest, NULL) return 
nothing if the call takes longer than 5 minutes and there is no 
interrupt? Is there some "special" XMLRPC timeout?


Any idea?

Andreas


Andreas Schlicker schrieb:

Hi all,

I'm using Apache/1.3.33 (Unix), PHP/5.0.3, mod_ssl/2.8.22, OpenSSL/0.9.6a.

I wrote a dummy script that is called by a Java program via XML-RPC, 
waits for some time and replies the start and end times.




If the script sleeps for up to 5 minutes, it works perfectly fine. 
However, I my real application will run probably an hour or so. If the 
script takes more than 5 minutes to execute, the client receives an 
empty response, even the header is missing. If I try to write the 
$xmlResponse to a file, the client receives a null message.


I wrote a small script without XMLRPC that acted the same way when 
called by a browser. This worked perfectly (I tested it up to 20 minutes 
waiting time) even if I used set_time_limit(5) and sleep(500).


Does anybody have an idea how to solve this problem? Thanks in advance.

Andreas



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] XML-RPC problem with long running times

2005-12-29 Thread Andreas Schlicker

Hi all,

I'm using Apache/1.3.33 (Unix), PHP/5.0.3, mod_ssl/2.8.22, OpenSSL/0.9.6a.

I wrote a dummy script that is called by a Java program via XML-RPC, 
waits for some time and replies the start and end times.




If the script sleeps for up to 5 minutes, it works perfectly fine. 
However, I my real application will run probably an hour or so. If the 
script takes more than 5 minutes to execute, the client receives an 
empty response, even the header is missing. If I try to write the 
$xmlResponse to a file, the client receives a null message.


I wrote a small script without XMLRPC that acted the same way when 
called by a browser. This worked perfectly (I tested it up to 20 minutes 
waiting time) even if I used set_time_limit(5) and sleep(500).


Does anybody have an idea how to solve this problem? Thanks in advance.

Andreas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php