Re: [PHP-DB] Browser timing out.

2003-08-21 Thread J. Michael Roberts
I've been going with the invisible data mathod right now and it doesn't seem
too bad.  What happens on the page is not much to look at and it only
returns maybe 1K while the script is running. However, what's happening in
the background is a huge-ass transfer of data.

To the user, all that's happening is "Running . . ." until the process is
(almost) done, at which point it tells them approximately when their request
will be completed.  To clarify, this is a print-request system I'm
developing so people stop bugging me about stupid printing stuff.  They pick
everything they need, how many copies, and the system does the rest for
them, insuring that the prints will look the same each and every time and
waste will be reduced to near-zero.  The big-ass query/process is the
transfer of data files to the printer. The actual database work is small and
fast.

What I've gone with (and works fairly well) is a print of 4096 spaces after
a file is transferred followed by a period. The user gets to watch a dot get
printed to the screen about once a second while their stuff is queued up.  I
was hoping to avoid having to send a bunch of whitespace, but it seems to be
the only way I can prevent a timeout.

--JMR

Micah Stevens wrote:


Once the current page has loaded, the browser should display whatever it's 

recieved, no matter how small. 



I'm a little confused as to what you're trying to do, are you displaying a 

litlle 'Please Wait for the big ass query' message for the user while the
SQL 

plugs away? IF that's the case, you could do a HTML meta refresh to display
a 

page that shows the message and then switches over to the second page that 

actually does the query. This works pretty well. 



I've had mixed results with the flush() command. It seems to work sometimes 

with just 1 byte of data, and othertimes it will wait for get a big chunck. 

('it' being the browser)



as far as doing it all on the same page goes, your best bet to deal with the


buffer is to output invisible data. IT seems silly, but as you can't
remotely 

control the buffer size, it'd probably do the trick. 



personally, I use the two page method though.









On Thursday 21 August 2003 1:18 pm, J. Michael Roberts wrote:

  

Okay, I'm going mildly crazy now.



I've got a huge query that runs and does all sorts of things...but the

problem is that it's taking longer than the proxy server will allow to

generate the HTML, thus the browser (IE) reports a timeout.



I've successfully executed the entire script using Netscape, but Netscape

appears to be a little more forgiving with it's buffer size than IE does.



I've tried using a flush() call, but the output that is displayed to the

user is fairly small in comparasion to all the stuff that's going on in the

background.



Is there a way to get IE to display the data it has received on the fly? 

If not, is there a way to force IE (and netscape) to use a smaller buffer

size? I've thought about filling up the output buffer with some hidden

garbage, but that would just be silly.



Any thoughts would be greatly appreciated.



--JMR







  




Re: [PHP-DB] Browser timing out.

2003-08-21 Thread colbey

Look at using server side compression, mod_Gzip or similar, PHP4.something
also has compression handler built in.. When dealing with compressing raw
HTML pages, very high compression levels can be reached..

Snippit from my mod_gzip+apache+php logs:

ip.ip.ip.ip - - [21/Aug/2003:17:17:01 -0400] "GET / HTTP/1.1" 200 3450
"http://referrer"; "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.0; Hotbar 4.3.1.0)" mod_gzip: DECHUNK:OK In:15234
Out:3450:78pct.

^^  78% compression can cut data transfer down pretty quick!



On Thu, 21 Aug 2003, J. Michael Roberts wrote:

> unfortunately, it's not something that can be offline.  What's actually
> happening is the database is being queried for information that allows the
> PHP script to find data files to be sent to the printer.  The query really
> isn't the problem, it's the sending of data when there is ALOT of data being
> sent.  Being that the actual data sent to the browser is minimal, both IE
> and Netscape wait until there is something worth printing before it renders
> the output.
>
> Basically, I need a way to force IE and Netscape to render the output so
> that the user doesn't get a timeout notification.
>
> --JMR
>
> [EMAIL PROTECTED]   wrote:
>
>
> Perhaps change it to an offline report?  I've done that in the past, it
>
> get's scheduled or backgrounded and the results are either emailed to the
>
> person, or generated report stored in the database for quick load later on
>
> (user gets email that report is ready for viewing)..
>
>
>
>
>
>
>
>
>
> On Thu, 21 Aug 2003, J. Michael Roberts wrote:
>
>
>
>
>
> Okay, I'm going mildly crazy now.
>
>
>
> I've got a huge query that runs and does all sorts of things...but the
>
> problem is that it's taking longer than the proxy server will allow to
>
> generate the HTML, thus the browser (IE) reports a timeout.
>
>
>
> I've successfully executed the entire script using Netscape, but Netscape
>
> appears to be a little more forgiving with it's buffer size than IE does.
>
>
>
> I've tried using a flush() call, but the output that is displayed to the
>
> user is fairly small in comparasion to all the stuff that's going on in the
>
> background.
>
>
>
> Is there a way to get IE to display the data it has received on the fly?  If
>
> not, is there a way to force IE (and netscape) to use a smaller buffer size?
>
> I've thought about filling up the output buffer with some hidden garbage,
>
> but that would just be silly.
>
>
>
> Any thoughts would be greatly appreciated.
>
>
>
> --JMR
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

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



Re: [PHP-DB] Browser timing out.

2003-08-21 Thread J. Michael Roberts
unfortunately, it's not something that can be offline.  What's actually
happening is the database is being queried for information that allows the
PHP script to find data files to be sent to the printer.  The query really
isn't the problem, it's the sending of data when there is ALOT of data being
sent.  Being that the actual data sent to the browser is minimal, both IE
and Netscape wait until there is something worth printing before it renders
the output.

Basically, I need a way to force IE and Netscape to render the output so
that the user doesn't get a timeout notification.

--JMR

[EMAIL PROTECTED]   wrote:


Perhaps change it to an offline report?  I've done that in the past, it

get's scheduled or backgrounded and the results are either emailed to the

person, or generated report stored in the database for quick load later on

(user gets email that report is ready for viewing)..









On Thu, 21 Aug 2003, J. Michael Roberts wrote:



  

Okay, I'm going mildly crazy now.



I've got a huge query that runs and does all sorts of things...but the

problem is that it's taking longer than the proxy server will allow to

generate the HTML, thus the browser (IE) reports a timeout.



I've successfully executed the entire script using Netscape, but Netscape

appears to be a little more forgiving with it's buffer size than IE does.



I've tried using a flush() call, but the output that is displayed to the

user is fairly small in comparasion to all the stuff that's going on in the

background.



Is there a way to get IE to display the data it has received on the fly?  If

not, is there a way to force IE (and netscape) to use a smaller buffer size?

I've thought about filling up the output buffer with some hidden garbage,

but that would just be silly.



Any thoughts would be greatly appreciated.



--JMR











  





Re: [PHP-DB] Browser timing out.

2003-08-21 Thread colbey
Perhaps change it to an offline report?  I've done that in the past, it
get's scheduled or backgrounded and the results are either emailed to the
person, or generated report stored in the database for quick load later on
(user gets email that report is ready for viewing)..




On Thu, 21 Aug 2003, J. Michael Roberts wrote:

> Okay, I'm going mildly crazy now.
>
> I've got a huge query that runs and does all sorts of things...but the
> problem is that it's taking longer than the proxy server will allow to
> generate the HTML, thus the browser (IE) reports a timeout.
>
> I've successfully executed the entire script using Netscape, but Netscape
> appears to be a little more forgiving with it's buffer size than IE does.
>
> I've tried using a flush() call, but the output that is displayed to the
> user is fairly small in comparasion to all the stuff that's going on in the
> background.
>
> Is there a way to get IE to display the data it has received on the fly?  If
> not, is there a way to force IE (and netscape) to use a smaller buffer size?
> I've thought about filling up the output buffer with some hidden garbage,
> but that would just be silly.
>
> Any thoughts would be greatly appreciated.
>
> --JMR
>
>
>

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



[PHP-DB] Browser timing out.

2003-08-21 Thread J. Michael Roberts
Okay, I'm going mildly crazy now.

I've got a huge query that runs and does all sorts of things...but the
problem is that it's taking longer than the proxy server will allow to
generate the HTML, thus the browser (IE) reports a timeout.

I've successfully executed the entire script using Netscape, but Netscape
appears to be a little more forgiving with it's buffer size than IE does.

I've tried using a flush() call, but the output that is displayed to the
user is fairly small in comparasion to all the stuff that's going on in the
background.

Is there a way to get IE to display the data it has received on the fly?  If
not, is there a way to force IE (and netscape) to use a smaller buffer size?
I've thought about filling up the output buffer with some hidden garbage,
but that would just be silly.

Any thoughts would be greatly appreciated.

--JMR