Delayed page display
am 04.03.2010 17:08:14 von Robert
I have a script that retrieves several queued email messages from a MySQL
database and sends them out, printing out progress as it goes along; for
example:
email1@example.com ... sent
email2@example.com ... sent
email3@example.com ... sent
Either "sent" or "failed" is displayed based on the result of the mail() call.
When accessing the script however, the browser(?) waits until the script has
completely processed prior to displaying the page (instead of displaying it in
progress). Other scripts on the same system display in progress, and it's
unclear what's different/special about this one.
The page header contains several hundred characters, and line breaks are
included after each "sent", so I don't think it's a browser buffering issue.
The behavior is the same in both Firefox & IE.
The engine is PHP 5.2 under Apache. And none of the ob_ functions are being
used. I did try adding a flush(), but the behavior is still the same.
So what else could cause the page to buffer completely prior to being
displayed?
Any insights appreciated,
Robert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Delayed page display
am 05.03.2010 01:00:08 von Robert
Additional info:
php.ini has output_buffering=4096. Calling flush() or ob_implicit_flush()
within the script doesn't seem to help. However setting
php_value output_buffering off
in .htaccess does the trick.
Any ideas what else to try? Would like a script-only solution that is not
php.ini/htaccess dependent.
Thanks,
Robert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: Delayed page display
am 05.03.2010 09:44:20 von M.Ford
> -----Original Message-----
> From: robert@visualize.info [mailto:robert@visualize.info]
> Sent: 05 March 2010 00:00
>=20
> Additional info:
>=20
> php.ini has output_buffering=3D4096. Calling flush() or
> ob_implicit_flush()
> within the script doesn't seem to help. However setting
> php_value output_buffering off
> in .htaccess does the trick.
If output buffering is on, you need both an ob_flush() and a flush() (in
that order) to force the output down the line.
Cheers!
Mike
--=20
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,=20
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom=20
Email: m.ford@leedsmet.ac.uk=20
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http:=
//disclaimer.leedsmet.ac.uk/email.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php