php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57999 Pie char drawing problem with apc.php
Submitted: 2008-01-09 10:39 UTC Modified: 2008-02-22 02:28 UTC
From: an dot scott at neu dot edu Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 4_4 CVS-2008-01-09 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: an dot scott at neu dot edu
New email:
PHP Version: OS:

 

 [2008-01-09 10:39 UTC] an dot scott at neu dot edu
Description:
------------
It seems likely that this bug is related to changes in php 4.4.8 regarding gd. PHP 4.4.8 isn't listed above as a choice, but I didn't see the problem with 4.4.7.

Basically the area that should be colored brown, as used memory in the pie chart display is colored green. It seems to depend on some specific memory allocation, as it doesn't always happen. If I change line 240 from (function_exists("imagefilledarc") to (!function_exists("imagefilledarc") to skip the 'imagefiledarc' function, the code seems to correctly fill the largest 'used' memory area with the correct color. Otherwise it will unpredictably color the area green, as free memory.

I was in a catch 22, as the bug report area of php requires that APC be disabled for bug reporting. :) So I send this to you. Maybe you guys can push this up to the PHP bugs. Thankyou.

Reproduce code:
---------------
http://www.casdn.neu.edu/~ascott/apc.php



Expected result:
----------------
Pie chart display of used memory allocations should be colored brown.

Actual result:
--------------
Pie chart of used memory allocations are sometimes colored green.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-09 10:41 UTC] an dot scott at neu dot edu
The result of going to the link I posted is sometimes correct, sometime not.
 [2008-01-29 20:52 UTC] shire@php.net
I've seen this problem before as well, next time you see it could you send me the output of (assuming the size is reasonable):

<?
echo serialize(apc_sma_info());
?>
 [2008-01-31 11:34 UTC] an dot scott at neu dot edu
Had to wait for the piechart problem to come up again. Below
is the output from apc_sma_info(). The 'detailed memory usage
and fragmentation' section says that there are 10 fragments.

a:4:{s:7:"num_seg";i:1;s:8:"seg_size";i:134217696;s:9:"avail_mem";i:51605640;s:11:"block_lists";a:1:{i:0;a:10:{i:0;a:2:{s:4:"size";i:40696;s:6:"offset";i:4178952;}i:1;a:2:{s:4:"size";i:188832;s:6:"offset";i:19686208;}i:2;a:2:{s:4:"size";i:1344;s:6:"offset";i:28901168;}i:3;a:2:{s:4:"size";i:64;s:6:"offset";i:41179128;}i:4;a:2:{s:4:"size";i:24368;s:6:"offset";i:41831128;}i:5;a:2:{s:4:"size";i:64;s:6:"offset";i:44089216;}i:6;a:2:{s:4:"size";i:797552;s:6:"offset";i:45308920;}i:7;a:2:{s:4:"size";i:147048;s:6:"offset";i:49184768;}i:8;a:2:{s:4:"size";i:8376;s:6:"offset";i:75862712;}i:9;a:2:{s:4:"size";i:50397296;s:6:"offset";i:83820432;}}}}
 [2008-01-31 15:25 UTC] shire@php.net
I've adjusted the display not to show slices less than 1%, this seems to fix this specific example.  Can you try this out for a while and report your results here again (if you still see it happening another serialized example would be most helpful).  Thanks!
 [2008-01-31 15:26 UTC] shire@php.net
(you can download the new apc.php file here: http://cvs.php.net/viewvc.cgi/pecl/apc/apc.php?revision=3.69)
 [2008-02-11 15:41 UTC] an dot scott at neu dot edu
Have been watching closely for several days, and the display problem has not happened since I put in the new version of apc.php.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 19:01:29 2024 UTC