Halaman

Rabu, 17 Maret 2010

PHPLOT (image does not display)

To show live charts on an event, I've search and found many Flash charts available. While trying some of them, I saw the beauty of SWF files...it's easy to use and their appearance are good. Unfortunately, I could not found SWF files that have feature to draw a supplemental chart. For example, to draw an up and bottom line as reference, or to print some point marks; other than the data itself to be displayed. After all, I've decided to use PHP's image that will generate an image on the fly. Rather than programatically build my self, I tried to use PHPLot on my laptop.

After modifying the source code, and ... baaaang ... a "live chart" appears on the screen ... of course with a twinkle / flicker when the refresh occurs on the web page every n seconds. In order to be more informative, I create additional lines and reference numbers as a guide.

Now, it's time to convey to the production system ... and make some tests. Surprisingly, the chart does not appear - the image does not display. I check GD library (2.0.34), in case of not installed in my production systems. But it was there. What's the problem?
I looked into the Apache2 error log, saying that PHP Warning: Division by zero in phplot.php on line 4432. After making some corrections on phplot.php ... the chart still not appear.

Then I compare the development and production environment, try to set display_errors = Off in PHP.ini file.

Great ..... it's work!! This saves me time, after spending of course!gile

On March 16, 2010 I had to work all day ... from 10:30 am untill 01:30 am in the office - to create and configure a network, install the IP camera, move applications to servers, and perform simulation- and continue to work until 04:20, the next day at home. I use FTP to transfer and update files on server at office ... but still encounter problem of a graph does not appear; go to bed ngantuk for about 2 hours and then returned to the office.

At 07:42 AM on March 17 .... last minute before I'm sure everything went smoothly..the charts appears after changing display_errors to off. I laughed out loud tepuktangan, a problem that should not have happened to me, but I might have changed some time ago for other cases.

Tidak ada komentar:

Posting Komentar