[rrd-users] Re: How can I use RRDTool with PHP?
info at daleenterprise.com
Mon Jun 5 15:06:55 MEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
On Jun 5, 2006, at 06:20 , Sepp Wang wrote:
> |Following is my source code:
> It can work, but always return the image's width and heigth.
> How can I discard it?
> Also, is there a better solution use RRDTool with PHP?
Yes there is a much easier way in PHP to use RRDTool, see the
following links to see that RRDTool functions can be embedded in PHP.
I rewrote the PHP module to properly support rrdtool 1.0.x and 1.2.x
in PHP4 and PHP5, this is mentioned on the list several time a month
yet the same question is asked.
You don't need to rebuild PHP to get this module included in PHP, you
can build it as a shared module and add the module to the load module
section in php.ini
Building as shared is as simple as downloading the module source, un
pack it, cd into the module source directory, issue the following
If you have RRDTool installed with a prefix of /usr or /usr/local you
can use "--with-rrdtool" as it will locate the the library.
For this example rrdtool 1.2.12 is install with a prefix of /usr/
local/rrdtool-1.2.12, the install prefix is the important information.
Edit php.ini and add the module to the extension load section,
restart apache and that should be it.
This really isn't the correct syntax to achieve your goal as it
doesn't look like rrd_graph is never called to update the image and
your html doesn't look like it's capable of serving the image other
than you are passing it raw before any headers are sent.
- -- Dale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v18.104.22.168 (Darwin)
-----END PGP SIGNATURE-----
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users