Tests on php-rrd not using rrdcahed
[ampy.git] / html / lastupdate.php
index 74a9479d345d4dbc61d729cf79a9b7cc5da0f456..b5b58a1a4bc1f7eabcd9e8df15faf687f0a67988 100644 (file)
@@ -4,6 +4,16 @@
 <?php
 require_once('config.php');
 
+#echo("getenv:".getenv('RRDCACHED_ADDRESS')."\n");
+#echo("env:".$_ENV['RRDCACHED_ADDRESS']."\n");
+
+#if (!putenv("RRDCACHED_ADDRESS=/var/run/rrdcached.sock"))  # doesn't work :/
+#      trigger_error("putenv failed!");
+#if (!apache_putenv("RRDCACHED_ADDRESS=/var/run/rrdcached.sock"))  # doesn't work :/
+#      trigger_error("apache_putenv failed!");
+#$_ENV['RRDCACHED_ADDRESS']='/var/run/rrdcached.sock';
+
+
 $info=rrd_lastupdate(RRDFILE);
 if ($info === FALSE)
        echo("error in rrd_lastupdate: ".rrd_error());