Re: Browser displays blank page, while request still being handled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris wrote:
Rolf Wouters wrote:
Chris wrote:

Rolf Wouters wrote:

Hello everybody

I'm having some strange behaviour in a PHP4 app I'm working on.

When I send my request to the server, it returns a blank page to me
within ca. 40 sec. On the server itself, my request is still being handled.


What exactly do you want help with? The blank page or the request still going?


The blank page. It shouldn't be there, and not when the request is still running. Or am I mistaken in thinking that the browser should wait with displaying _anything_ before it becomes the result-page from the server.

I'm guessing it's just a timeout issue - "maximum execution time exceeded" type thing - check your php or apache error logs and see what that tells you.. if nothing shows up, turn log_errors on, restart apache and see what you get.
I don't think it's a timeout issue on the server-side, because I've already tried setting MAX_EXECUTION_TIME and MAX_INPUT_TIME to extremly high values, and got the same result (i.e. the blank page). By setting them to extremly low values I was able to verify the app/script/server 's behaviour when it did timeout, and that produced the expected warning-message for MAX_EXECUTION_TIME exceeded.

I couldn't find anything in the logs, although log_errors is turned on, and the logging levels set to log everything thats possible.

Try adding some flush() calls to the script. That might get the browser to display some content.. Don't know whether it will work though.
That's something I haven't tried yet, so thanks for the tip.

Copy has to wait until it's finished before telling you the results. If it's copying a 20M file, that takes a while.. If you're copying multiple 20M files, then hey.. there's you're problem. How many and how big are the files in this case?
We're talking about multiple copy operations. The first one copies 230 files (approx. 40mb) and the second one copies about 2200 files (195mb). Most files are under 400kb a piece. The request shouldn't generate any output untill it is completely finished. In between different operations, all message are stored in a string-variable. At the end of the publish-request, another request (show_result) is called, and the result-string is placed into $_REQUEST, like this:

$_REQUEST["result"] = &$result;


You might be better off running a script to run through cron every 5 minutes or so and doing it all for you.. then getting it to email you the results.

Running the script through cron wouldn't be a good idea. The app we're talking about is a kind of Content Management System for photographers, so the publish-request should only be called when the user has finished his modifications to the site and is ready to publish them to his website.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux