title: PHP-RRD Wasn't Work
body: <p>I am trying to create rrd graph by php5-rrd libraires.
  I am trying to draw (LASTHOUR,LASTDAY,LASTWEEK,LASTMONTH) graphs. but not work well, (maybe my RRA settings are missing). i try to use "rrd_update" function. but doesn't work. so try to use "rrd_fetch" function. but all data appear on -NaN.</p>
  
  <p>This is my console log.</p>
  
  <pre><code>1426322479:6249:1817
  Array
  (
      [start] =&gt; 1426318800
      [end] =&gt; 1426322700
      [step] =&gt; 300
      [data] =&gt; Array
          (
              [Users] =&gt; Array
                  (
                      [1426319100] =&gt; NAN
                      [1426319400] =&gt; NAN
                      [1426319700] =&gt; NAN
                      [1426320000] =&gt; NAN
                      [1426320300] =&gt; NAN
                      [1426320600] =&gt; NAN
                      [1426320900] =&gt; NAN
                      [1426321200] =&gt; NAN
                      [1426321500] =&gt; NAN
                      [1426321800] =&gt; NAN
                      [1426322100] =&gt; NAN
                      [1426322400] =&gt; NAN
                      [1426322700] =&gt; NAN
                  )
  
              [Games] =&gt; Array
                  (
                      [1426319100] =&gt; NAN
                      [1426319400] =&gt; NAN
                      [1426319700] =&gt; NAN
                      [1426320000] =&gt; NAN
                      [1426320300] =&gt; NAN
                      [1426320600] =&gt; NAN
                      [1426320900] =&gt; NAN
                      [1426321200] =&gt; NAN
                      [1426321500] =&gt; NAN
                      [1426321800] =&gt; NAN
                      [1426322100] =&gt; NAN
                      [1426322400] =&gt; NAN
                      [1426322700] =&gt; NAN
                  )
  
          )
  
  )
  </code></pre>
  
  <p>This is my PHP Code</p>
  
  <pre><code>$rrdFile = dirname(__FILE__) . "/speed.rrd";
  
  //create rrd file
  rrd_create($rrdFile,
      array(
          "DS:Users:GAUGE:600:0:U",
          "DS:Games:GAUGE:600:0:U",
          "RRA:AVERAGE:0.5:1:1440",
          "RRA:AVERAGE:0.5:5:1440",
          "RRA:AVERAGE:0.5:30:800",
          "RRA:AVERAGE:0.5:120:800",
          "RRA:AVERAGE:0.5:1440:80"
      )
  );
  
  //update rrd file
  if(!(rrd_update($rrdFile,
      array(
          "N:".rand(0,9999).":".rand(0,9999)
      )
  ))) {
      $err = rrd_error();
      echo "rrd_update() ERROR: $err\n";
  }
  
  // TEST CODE
  $result = rrd_fetch( $rrdFile, array( "AVERAGE", "--resolution", "100", "--start", "-1h", "--end", "start+1h" ) );
  
  print_r($result);
  
  
  //graph output
  if(!is_array(rrd_graph(dirname(__FILE__) . "/speed.png",
      array(
          "--start", "-1h",
          "--title", "Status",
          "--vertical-label", "Users &amp; Games",
          "--width", "600",
          "--height", "200",
          "DEF:Users=$rrdFile:Users:AVERAGE",
          "DEF:Games=$rrdFile:Games:AVERAGE",
          "CDEF:cUsers=Users",
          "CDEF:cGames=Games",
          "LINE:cUsers#FF0000",
          "LINE:cGames#00FF00"
      )
  ))) {
      $err = rrd_error();
      echo "rrd_graph() ERROR: $err\n";
  }
  </code></pre>