Hi:
Have an application that is an endless loop structured something like this:
initialize
|
|
start loopa (infinite)
|
|
start loopb (infinite and conditional)
|
|
If event occurs terminate loopb
else redo loopb
|
|
imagepng($image);
imagedestroy($image);
|
|
redo loopa (forever)
The application executes properly. What does not happen however, is that the
graphics image is never displayed. If instead of making loopa an infinite loop
and execution is allowed to terminate and the ?> tag is executed then the graphics
image is displayed.
This same structure, if instead of attempting to output a graphics image, outputs
an echo (or similar) statement then it works as expected.
I have tried many different things to try to coax the graphics image to output
but so far have not found any resolution and I have also failed to find anything
on the web about this.
At this point, I am using apache2 webserver, php 4.3 in local mode with firefox and i.e.
browsers and windows op system.
Since the application depends on continous operation within the loop structures
rather than just a simple single pass I am soliciting assistance from those
more versed in this area.
Thanks in advance,
Bob Downs
php & gd...outputting image problem
Moderator: General Moderators
I suppose that this is a type of animation.
The application is to provide an automatically updated strip chart display. the data source is a remote unit that periodically sends a file to the server via ftp.
The idea (which may prove impractical) is to provide the viewer with
an automatically updated view of current as well as historic data.
The load on the server should be very low since the data points come at
least 3 minutes apart and may be much, much longer.
Apparently, the
imagepng($image);
outputs to an internal buffer but
flush();
or
ob_flush();
really don't cause the buffer to be flushed to the browser as one might
hope.
Hope this makes sense.
The application is to provide an automatically updated strip chart display. the data source is a remote unit that periodically sends a file to the server via ftp.
The idea (which may prove impractical) is to provide the viewer with
an automatically updated view of current as well as historic data.
The load on the server should be very low since the data points come at
least 3 minutes apart and may be much, much longer.
Apparently, the
imagepng($image);
outputs to an internal buffer but
flush();
or
ob_flush();
really don't cause the buffer to be flushed to the browser as one might
hope.
Hope this makes sense.
refreshing page
Don't thnk we have access to the server to perform a CRON process...I'll have to check that.
I also have to think about using the html refresh tag.
Thanks for your suggestion.
I also have to think about using the html refresh tag.
Thanks for your suggestion.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
there are a few ways around needing cron, such as using user page queries to make ticks in a log file or table that allows you to track how much time has elapsed since the last update thereby allowing your script to decide when to actually look for a new version of the file to copy down to the web server..