Posts filed under 'Centos'

PHP timezone settings

I just did a fresh install of AMP and the first php app I installed gave me the following error.

Warning: date() [function.date]: 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. We selected ‘UTC’ for ‘UTC/0.0/no DST’

 

It turned out to be a quick fix.

First go to this page and find the syntax for your timezone.

http://nl3.php.net/manual/en/timezones.php

Once you have this edit your php.ini file and add the following to it

(If you are using a distro ini search for date to find the example)

date.timezone = “America/New_York”
Exchange the proper timezone for your region

 

 

 

Add comment May 7th, 2011

How to use centos as a remote syslog server

How to enable remote syslog on centos and store data coming in from
one or more devices on your centos machine.

Changes on the centos machine you want to receive syslog data:
(Turn on remote syslog service)

/etc/sysconfig/syslog

Change:
SYSLOGD_OPTIONS=”-m 0″
To:
SYSLOGD_OPTIONS=”-r -x m 0″

 

Set up permissions for each device you want to accept data from

edit
/etc/syslog.conf
Add:

+ip.of.device.1
local7.* /var/log/switch1.log
+ip.of.device.2
local7.* /var/log/switch2.log

# The plus in front of the IP indicates its a remote device.

# You can have as many devices you want log to the same file. The
entries are prefixed by thier IP or Hostname

# You can use host names if you want, they just need to be able to resolve.

# One last note, I think centos needs tabs in syslog.conf to separate columns not spaces.

Add comment April 18th, 2011


Calendar

September 2017
M T W T F S S
« May    
 123
45678910
11121314151617
18192021222324
252627282930  

Posts by Month

Posts by Category