IBM Support

PHP time zone issue

Troubleshooting


Problem

Repeated warning messages in cacti.log about "Partial Result: strtotime()", because time zone is not set in php.ini

Symptom

cacti.log shows repeated warning message like
03/23/2015 02:55:02 PM - CMDPHP: Poller[0] Host[14] DS[200] WARNING:    
Result from SERVER not valid.  Partial Result: Warning: strtotime()     
                                                                        
03/23/2015 02:55:02 PM - CMDPHP: Poller[0] Host[14] DS[201] WARNING:    
Result from SERVER not valid.  Partial Result: U                        
                                                                        
03/23/2015 02:55:02 PM - CMDPHP: Poller[0] Host[14] DS[202] WARNING:    
Result from SERVER not valid.  Partial Result: Warning: date(): It      
                                                                        
03/23/2015 02:55:02 PM - CMDPHP: Poller[0] Host[14] DS[203] WARNING:    
Result from SERVER not valid.  Partial Result: U

Cause

If your PHP version is 5.3 or higher, it requires time zone setting in php.ini

Diagnosing The Problem

If error_log logging defined in php.ini, the error_log will also show error messages like

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier...

Resolving The Problem

Set the date.timezone parameter in /etc/php.ini

For a list of valid time zones, check the link: php time zones

Please also make sure the file has read permission for non-root user, because cacti poller usually run as non-root user, e.g. apache.

After the change, restart httpd

service httpd restart

[{"Product":{"code":"SSVMSD","label":"Platform RTM"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1.0;9.1.2;9.1.3","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
Platform RTM

Software version:
9.1.0, 9.1.2, 9.1.3

Document number:
676487

Modified date:
19 August 2022

UID

isg3T1016839

Manage My Notification Subscriptions