LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2011, 08:54 AM   #1
5outh
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
[SOLVED] Zabbix on CentOS 5.5, PHP tmezone error


Hi,

I'm very new to linux, and I'm trying to set up a Zabbix server locally so I can learn the program. I have a book (Zabbix 1.8 Network Monitoring) that I'm trying to follow along in, but the installation instructions aren't specific enough for me to understand, so I've opted to use this script to get it running on my system.

...and it worked. But, as I've seen in the comments, the install script leaves out some PHP stuff that I'm trying to work around. When I load my page at localhost/8080, the screen fills with red error messages saying:

Quote:
* date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead[/usr/local/share/zabbix/include/page_header.php:149]
page_header.php changes with the rest of them (I assume because they're for different parts of the frontend), but I can't get them to go away. I have tried:

editing /etc/php.ini to say
Quote:
[Date]
; Defines the default timezone used by the date functions
date.timezone = "America/Los_Angeles"
editing /usr/local/share/zabbix/include/page_header.php from
Quote:
$tmezone = 'America/Los_Angeles';
if(empty($tmezone)) {
info(S_TIMEZONE_FOR_PHP_IS_NOT_SET_PLEASE_SET);
date_default_timezone_set('America/Los_Angeles');
}
unset($tmezone);
}
where originally $tmezone was set to pull date.timezone from php.ini (I don't know PHP, so I'm not sure what the actual code was. Probably should have jotted it down. >< Also, date_default_timezone_set was ('UTC'), I think. Again, probably should have made a note...

I've also tried moving all of the code down a little bit (just adding some spaces in the first commented out section of the script), and the line the error is on does change. I read that someone had an issue with it staying the same on another forum.

I'm doing this for work and I'm kind of at a halt with my project. So, needless to say, it's pretty important. Any help would be greatly appreciated. Thank you in advance!

EDIT: I restarted the server and it updated and is now working...so nevermind. Thanks anyway

Last edited by 5outh; 08-18-2011 at 09:26 AM.
 
Old 08-21-2011, 03:10 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and Welcome to LinuxQuestions,

Glad you got is solved. Off the Zero Reply List.

Kind regards,

Eric
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
net-snmp,php,mysql etc packages needed for Zabbix Installation nasiruddin SUSE / openSUSE 2 08-17-2011 09:09 AM
How to install Zabbix on CentOS !!! ducloiag Linux - Newbie 15 11-03-2010 04:24 AM
zabbix error!! hasan_sust Linux - Newbie 3 04-30-2009 07:12 AM
apache 2.0.63 with mod_fcgid and php-cgi error on CentOS 5.2 64Bit robertjinx Linux - Server 1 11-20-2008 02:29 PM
mysql.h error in Ubuntu (zabbix install) khilari Linux - Networking 2 07-06-2006 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration