"Snyke" wrote:
Hi.
I have a command line script which works really fine, the only
problem is that it take *really* long for the first output to be printed on
screen.
Since I also get some HTTP headers I’m suspecting that some sort
of
output buffering is used.
How can I tell PHP to flush the buffer automatically (without using
flush(); after every print or echo) and to remove the headers?
Snyke, why do you have http headers in command line php. It is not
needed. At a minimum, you can put in some conditional statements to
take them out if running from command line (there are ways to
auto-detect running from command line vs. from browser).
Once that is done, it is much easier to isolate the problem.
By the way, I have a ton of command line php code, and never seen this
problem, so I suspect something is going on before the first echo...
you may want to take out the code, or put in some timing echo
statements.
steve
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-Speeding...ict136881.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=457262