Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #3950

Re: Order/Timing of Execution of PHP

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news-transit.tcx.org.uk!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!news.astraweb.com!border2.a.newsrouter.astraweb.com!border2.hitnews.com!xlned.com!feeder1.xlned.com!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="UTF-8"
Message-ID <7115120.c4VAs2iPgL@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <php@PointedEars.de>
Organization PointedEars Software (PES)
Date Mon, 28 Nov 2011 01:53:51 +0100
User-Agent KNode/4.4.11
Content-Transfer-Encoding 8Bit
Subject Re: Order/Timing of Execution of PHP
Newsgroups comp.lang.php
References <xn0hm3pyv2tnoe7000@news.individual.net> <4ed245c3$0$29369$a8266bb1@newsreader.readnews.com>
Followup-To comp.lang.php
MIME-Version 1.0
Lines 28
NNTP-Posting-Date 28 Nov 2011 01:53:51 CET
NNTP-Posting-Host 66e92800.newsspool3.arcor-online.net
X-Trace DXC=PBe8ICIIW;fPXlQ;h]GTMdMcF=Q^Z^V3h4Fo<]lROoRa8kF<OcfhCOk9aNUc68?K]hDZm8W4\YJNl;?f@h5gMfblObTfU2klSEnH9\9;114NWd
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:3950

Followups directed to: comp.lang.php

Show key headers only | View raw


Denis McMahon wrote:

> On Sun, 27 Nov 2011 12:01:47 +0000, Jeff Gaines wrote:
>> It works but doesn't echo 'Creating Thumbnails' etc. until it has called
>> the function and returned from it.
> 
> Possibly caused by buffering on the server, or even the client waiting to
> render output until it's able to decide what is to be rendered and how?
> 
> I think it's better to do all the processing first, and then send the web
> page afterwards, rather then send html in dribs and drabs while you're
> doing the processing. This isn't the way I used to think, but it has
> advantages. For example, you can trap and react to errors in the
> processing by issuing http error headers, which you can't do if you've
> started output.

The disadvantage of it is that the user would have to wait for all PHP 
processing to finish before seeing any content.  I have recently heard of an 
approach to mitigate, even solve, this problem, but I do not remember how it 
worked.


PointedEars
-- 
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
  -- Richard Cornford, comp.lang.javascript, 2011-11-14

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Order/Timing of Execution of PHP "Jeff Gaines" <jgaines_newsid@yahoo.co.uk> - 2011-11-27 12:01 +0000
  Re: Order/Timing of Execution of PHP Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-27 14:14 +0000
    Re: Order/Timing of Execution of PHP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-28 01:53 +0100
  Re: Order/Timing of Execution of PHP Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-27 09:43 -0500
    Re: Order/Timing of Execution of PHP "Jeff Gaines" <jgaines_newsid@yahoo.co.uk> - 2011-11-28 11:07 +0000

csiph-web