php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68980 the example report a error msg
Submitted: 2015-02-03 14:56 UTC Modified: 2015-02-04 02:36 UTC
From: comdeng at live dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.5.21 OS: centos 6.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: comdeng at live dot com
New email:
PHP Version: OS:

 

 [2015-02-03 14:56 UTC] comdeng at live dot com
Description:
------------
---
From manual page: http://www.php.net/rrd.examples-oop
---

I paste the code to my site, and found this error:

Fatal error: Uncaught exception 'Exception' with message '/home/dengxiaolong/sites/default/rrdtool/tmp/speed.rrd: illegal attempt to update using time 920805000 when last update time is 1422111060 (minimum one second step)' in /home/dengxiaolong/sites/default/rrdtool/index.php:24 Stack trace: #0 /home/dengxiaolong/sites/default/rrdtool/index.php(24): RRDUpdater->update(Array, '920805000') #1 {main} thrown in /home/dengxiaolong/sites/default/rrdtool/index.php on line 24


Test script:
---------------
just the example of the document

Expected result:
----------------
the picture of rrd

Actual result:
--------------
Fatal error: Uncaught exception 'Exception' with message '/home/dengxiaolong/sites/default/rrdtool/tmp/speed.rrd: illegal attempt to update using time 920805000 when last update time is 1422111060 (minimum one second step)' in /home/dengxiaolong/sites/default/rrdtool/index.php:24 Stack trace: #0 /home/dengxiaolong/sites/default/rrdtool/index.php(24): RRDUpdater->update(Array, '920805000') #1 {main} thrown in /home/dengxiaolong/sites/default/rrdtool/index.php on line 24

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-04 02:36 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2015-02-04 02:36 UTC] aharvey@php.net
As with most examples, you can't just blindly copy/paste it: the values in the example (such as the time) are things that you'll need to change to match your environment.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC