note 46593 added to function.echo

From: Date: Sat, 16 Oct 2004 14:24:27 +0000
Subject: note 46593 added to function.echo
Groups: php.notes 
Request: Send a blank email to php-notes+get-78660@lists.php.net to get a copy of this message
I also advise to save time preparing a big output as a variable and after that output it with echo command instead of many echo calls. I had Apache 2.0.50/PHP 5.0.1./MySQL 4.2.21/ additional package PHP 5.0.0. under Windows XP Pro; browsers Mozilla 1.7.2 und IE 6.0. If I had few output, it was OK. The more output I had the oftener ( but not always) has appeared an error: something as "Problem at Apache HTTP Server, send a report to the Microsoft" under the both browsers and also an alert with "The document contains no data" under Mozilla. In the Apache log\errors.log file I have found such messages: [Sat Oct 16 09:03:52 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sat Oct 16 09:03:53 2004] [notice] Parent: Created child process 2644 [Sat Oct 16 09:03:53 2004] [notice] Child 2644: Child process is running [Sat Oct 16 09:03:53 2004] [notice] Child 2644: Acquired the start mutex. [Sat Oct 16 09:03:53 2004] [notice] Child 2644: Starting 250 worker threads. Then I have change the code; first all was saved in a variable: $out = "<h4>Timetable</h4>"; $out .= "Lessons: " . $les . "<br/>"; ... and then output: echo "$out"; And I had the problem no more. I have measured the output time, it is now 5-7 time fewer now. I has understood, it was a timeout at the Apache because of a big output time. P.S. I have written with an Apache & Mozilla error message to let people find it through Google. ---- Manual Page -- http://www.php.net/manual/en/function.echo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46593 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46593&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46593&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78660) next »