[rrd-developers] Re: --enable-local-XXXXX doesn't work.
techtonik at tut.by
Thu Mar 3 22:34:20 MET 2005
||*()*|| [\..konnichi wa, ogenki desu ka, D../]
>> On another note, with the PHP extensions there is a conflict with
>> pdflib and rrdtool and as far as I can tell this is related to libpng
>> but because I cannot build using the local libpng I am unable to rule
>> this possibility out.
>> If someone can assist me with this matter I would be greatly
>> -- Dale
DW> I am very serious about adding to the widespread use of rrdtool by
DW> increasing it's ease of use and promoting it's access, please see the
DW> following pages:
I can see only phpinfo() pages. =)
DW> I am experiencing some difficulties/bugs with the rrdtool source
DW> package and several pleas for assistance have gone ignored/un-answered.
DW> While I realize that some people are busy, I cannot believe that no one
DW> involved in this project has any time available to assist in solving
DW> some issues that are independant of my side-project.
To tell the truth I thought about changing API for PHP extension,
because current implementation is very poor and doesn't make any
difference from using rrdtool from cmdline via exec() or passthru().
What would I like to get from extension is direct image conveyor to
stdout without temporary files; resource id instead of direct file link
like in mysql extension - so you don't need to specify filename every
time you call a function (it will be nice to have OO style for this
also); split options into several constructions where it is possible
and separate them logically in arguments.
>mixed rrd_graph(string filename, array options, int num_of_elements)
> rrd_graph takes 3 arguments, a filename of an RRD file,
>an array of options (exactly like you would pass in the RRDs perl
>library, or on the command line to 'rrdtool'), and the last argument
>is the number of elements in the array of options. This can be
>obtained by simply calling " count($opt_array) ". See the example
>scripts for a more clear example.>...
> If rrd_graph is successful, an array is returned. The
>array is an associate array with 3 values:
>$array[xsize] - The size of the image along the X axis.
>$array[ysize] - The size of the image along the Y axis.
>$array[calcpr] - This is actually another array, that will contain
> the results of any PRINT statements.
> If rrd_graph is not successful, a 0 is returned.
>IMPORTANT NOTE: In order for php not to complain about mis-using
>the return value, it is important that you check the type of the
>return value. use the " is_array() " function to check if the
>returned value is an array (in which case rrd_graph was successful),
>or not an array (meaning rrd_graph was NOT successful). See the
>examples for an illustration of this.
definitely bad implementation. Function can determine number of
options elements by itself, but still relies on user to do it
manually. Second is that AFAIR common convention is to return FALSE
on failure - not zero.
mixed rrd_graph(string filename, array options)
If rrd_graph is successfull, GD image resource is returned, which can
be freely used with GD functions.
Due to the lack of time to criticize exiting API I'll be able to think
about more clear solution only on weekend. =)
(B)uilding, (A)ntenna, (S)pan and (E)arth
* terminal velocity - 54m/s, 305m *
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
More information about the rrd-developers