OpenBSD 3.6
Cacti 0.8.6c
Apache 1.3.29
PHP 4.3.10
RRDtool 1.0.48
MySQL 4.0.20
Everything works fine, its just a matter of my graphs being displayed as GMT. I'm GMT-6:00 (CST6CDT).
The log file from cacti is displayed correctly.
The MySQL database is using CST.
My system doesn't seem to care about the TZ environmental variable. (changing it, date, changing it, date doesn't do anything)
--------------------------------------------------------------------
POST TURNAROUND
SOLUTION FOUND
--------------------------------------------------------------------
As I was giving info about my problem, I fixed it. So I thought I would share my solution with everyone.
*** First of all, this solution has to do with the fact that my Apache is chrooted. This solution probably applies to those of you with this configuration. ***
I made a test file called systemtime.php and put it in my cacti web root. (/var/www/cacti)
It looks like this:
Code: Select all
<?php
$html="
PHP time: ".date("D M j H:i:s T Y")."<br>
System time: ".exec('date')."<br>";
echo $html;
?>
Code: Select all
PHP time: Wed Feb 16 09:40:20 CST 2005
System time:
Code: Select all
cp /bin/date /var/www/bin
Code: Select all
PHP time: Wed Feb 16 09:44:47 CST 2005
System time: Wed Feb 16 15:44:47 GMT 2005
Code: Select all
mkdir /var/www/usr/share
mkdir /var/www/usr/share/zoneinfo
cp -R /usr/share/zoneinfo/* /var/www/usr/share/zoneinfo/
cd /var/www/etc
# be sure to use relative paths for the following
# link localtime to your timezone in /var/www/usr/share/zoneinfo
ln -sf ../usr/share/zoneinfo/CST6CDT localtime
Code: Select all
PHP time: Wed Feb 16 09:49:17 CST 2005
System time: Wed Feb 16 09:49:17 CST 2005
Code: Select all
rm /var/www/cacti/systemtime.php
Just for the record (and the text in docs/README), I have a perfectly working Cacti running in OpenBSD 3.6 with a chrooted Apache. If you need a complete how to then let me know. Either way, it works, so update your README.
Oh, props to the Cacti team, developers, and users... this is a great software package.
-Russ