summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a0453d)
raw | patch | inline | side by side (parent: 6a0453d)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 30 May 2007 09:28:30 +0000 (09:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 30 May 2007 09:28:30 +0000 (09:28 +0000) |
contrib/php4/examples/rrd_fetch.php | patch | blob | history | |
contrib/php4/php_rrdtool.h | patch | blob | history | |
contrib/php4/rrdtool.c | patch | blob | history |
index 470fb9f8720c9ab01252e27c2a37f3c88f7a951f..3b17ea1e621b8204f7d33f9c4fe1306e415a603d 100644 (file)
for($i = 0; $i < count($ret[data]); $i++)
{
$tmp = $ret[data][$i];
- echo "$hi\n";
+ echo "$tmp\n";
}
}
else
index 7bc19983bc52101206fa7c91dc93ae18c3d516dd..756c4bc40ff388424c67f4c81ab3c268b3083934 100644 (file)
#ifndef _PHP4_RRDTOOL_H
#define _PHP4_RRDTOOL_H
+#ifdef HAVE_CONFIG_H
+#include "php_config.h"
+#endif
+
#if COMPILE_DL
#undef HAVE_RRDTOOL
#define HAVE_RRDTOOL 1
diff --git a/contrib/php4/rrdtool.c b/contrib/php4/rrdtool.c
index 87b9fd2663cb86c82c54b6959bbb5a095ed431d3..54ddedb9e58ad0a2c57f5b8cdb7380566aada5c3 100644 (file)
--- a/contrib/php4/rrdtool.c
+++ b/contrib/php4/rrdtool.c
};
zend_module_entry rrdtool_module_entry = {
- "RRDTool",
- rrdtool_functions,
- NULL,
- NULL,
- NULL,
- NULL,
- PHP_MINFO(rrdtool),
- STANDARD_MODULE_PROPERTIES,
+#if ZEND_EXTENSION_API_NO >= 220050617
+ STANDARD_MODULE_HEADER_EX, NULL,
+ NULL, /* dependencies */
+#else
+ STANDARD_MODULE_HEADER,
+#endif
+ "RRDTool", /* name */
+ rrdtool_functions, /* functions */
+ NULL, /* module_startup_func */
+ NULL, /* module_shutdown_func */
+ NULL, /* request_startup_func */
+ NULL, /* request_shutdown_func */
+ PHP_MINFO(rrdtool), /* info_func */
+ NO_VERSION_YET,
+ STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_RRDTOOL
zval *p_calcpr;
HashTable *args_arr;
int i, xsize, ysize, argc;
+ double ymin, ymax;
char **argv, **calcpr;
}
optind = 0; opterr = 0;
- if ( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize) != -1 )
+ if ( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize, NULL, &ymin, &ymax) != -1 )
{
array_init(return_value);
add_assoc_long(return_value, "xsize", xsize);
add_assoc_long(return_value, "ysize", ysize);
+ add_assoc_double(return_value, "ymin", ymin);
+ add_assoc_double(return_value, "ymax", ymax);
MAKE_STD_ZVAL(p_calcpr);
array_init(p_calcpr);