Tuesday, December 6, 2011

Progress reports from PHP

I have been trying to sort things out for myself, without
asking for help too

often, and have made a lot of progress. I have just finished
a procedure for

scanning the original images for a photograph album,
shrinking them to the

working sizes, using several alternative algorithms depending
on the shape of

the image, and saving them to the appropriate directories.
The program is fully

automatic, and is extremely flexible but it is rather slow,
and takes anywhere

from six to 10 seconds to process each image.



Unfortunately, although I report each image as it is saved,
nothing is displayed

until all the images are processed. As this could take
anything up to half an

hour it would be nice to have some feedback to tell me the
program is actually

doing something, and is not simply stuck in a loop.



Can anyone help?

Clancy

Progress reports from PHP
Clancy wrote:

%26gt; Unfortunately, although I report each image as it is
saved, nothing is displayed

%26gt; until all the images are processed. As this could take
anything up to half an

%26gt; hour it would be nice to have some feedback to tell me
the program is actually

%26gt; doing something, and is not simply stuck in a loop.



It sounds as though you need the PHP output control
functions:




http://docs.php.net/manual/en/ref.outcontrol.php



--

David Powers, Adobe Community Expert

Author, ''The Essential Guide to Dreamweaver CS3'' (friends of
ED)

Author, ''PHP Solutions'' (friends of ED)


http://foundationphp.com/

Progress reports from PHP
David Powers %26lt;david@example.com%26gt; wrote:



%26gt;It sounds as though you need the PHP output control
functions:



I am sorry, David. I think I fell foul of the single
click/double click trap

when I retrieved messages after I had posted my first
message. I use Agent as

my e-mail handler, and if I carelessly double click ''Retrieve
messages'' it

retrieves all the new messages and highlights them, but on
the second pass it

marks them all as ''read'', and then retrieves any messages
that have come in

since the first pass.



I remember being surprised that there were no new messages
after I had sent my

message, and wondered if the site was playing up again. When
my message still

hadn't appeared in the morning, I assumed that it must have
been lost, so I

resent the original message, then dealt with the new
messages, and then noticed

your first reply at the end of the ''read'' messages.



I then looked up your reference (I had not found it myself
because I didn't have

the faintest idea of what to look for) and was mystified
because it appeared to

state that buffering should be off, and I had certainly not
turned it on. Then

I noticed that the first user comment on the definition
states:



''Please note that most browsers don't display a table unless
they passed its

end-tag ''%26lt;/table%26gt;''.



Thats why using this feature in HTML-tables might not result
in what you

expected...''



I fear that this is my answer. As all my pages are
automatically wrapped in a

table, this will be rather difficult to overcome.



Fortunately in this case the problem is not too serious, as I
can set ''Thumbs

Plus'' to watch the destination directory, and a new
thumbprint will pop up as

each new file is written.



Clancy


.oO(Clancy)



%26gt;David Powers %26lt;david@example.com%26gt; wrote:

%26gt;

%26gt;%26gt;It sounds as though you need the PHP output control
functions:

%26gt;

%26gt;I am sorry, David. I think I fell foul of the single
click/double click trap

%26gt;when I retrieved messages after I had posted my first
message. I use Agent as

%26gt;my e-mail handler, and if I carelessly double click
''Retrieve messages'' it

%26gt;retrieves all the new messages and highlights them, but
on the second pass it

%26gt;marks them all as ''read'', and then retrieves any messages
that have come in

%26gt;since the first pass.



Check Agent's preferences. There's an option to define when
to

automatically mark messages read and which.



Micha

No comments:

Post a Comment