Archive for June, 2010

How to configure ProFTPD to chroot users to /home directory or any other selected directory

Wednesday, June 30th, 2010

If you’re using ProFTPD user on a Linux server you most certainly has wondered how you can configure the FTP server to chroot (or jail) it’s users to a particular directory of choice.

By the default the behaviour of ProFPTD is not to use any chrooting, I believe because chrooting is not yet a mass well accepted standard, so you will have to do a minor modifications to proftpd.conf file.
Actually it’s a way easier than it sounds to configure the ProFTPD to chroot / jail it’s users.

To configure ProFTPD to chroot it’s users to the /home directory all you have to do is edit your proftpd.conf
On Debian Linux and many other Linux distributions the proftpd.conf is located in /etc/proftpd/proftpd.conf

root@linux-server:~# vim /etc/proftpd/proftpd.conf

Therein uncomment the line # DefaultRoot ~

to read

DefaultRoot ~

If you further need to chroot proftpd users to be jailed to let’s say their public_html file for security reasons you can just change the up-mentioned proftpd DocumentRoot directive to:

DefaultRoot ~/public_html

Hopefully partaking this steps will be a step further to make your Linux server a bit more secure.

Quick way to add user to another user group in Linux

Tuesday, June 29th, 2010

Here is how to add user to be a member of another user’s group in GNU/Linux.
Everytime I have to add user to a group I always try to remember for a few seconds how I did it last time.
Therefore I finally decided to blog it here that I possibly help to somebody out there and help myself easily look for it among the posts in case I forget sometime in the future:
There are two ways to add an user to a group.

1. Add user to a group directly editting /etc/groups

Let’s assume you are in need to add user test to the www-data groupHere is how:

linux-server:~# vim /etc/groups
Put in the file
www-data:x:33:test
Save the file and that should be enough, in the next login with user test you can observe the user is added to the www-data group
By typing the id command in the command line.


linux-server:~$ idid=1000(test) gid=1000(test)
groups=1125(test),1124(www-data)

2. Add user to another user group using the useradd and usermod commands

If you’re creating a brand new user to be membering a group use:

linux-server:~# useradd -G
linux-server:~# useradd -G www-data test
linux-server:~# passwd test

If for clarity you’d like to add an already existing user using a linux command consider using usermod

linux-server:~# usermod -a -G www-data test

How to get full url to accessed controller action in Zend php framework

Tuesday, June 29th, 2010

I’ve recently wondered how I can get the full url address of a requested controller/action in Zend php framework.
After some tries I finally did it:

Here is how to achieve it:

$fullUrl = "http://". $this->getRequest()->getHttpHost() . $this->view->url();

How to permanently Disable Firefox from storing web caches and how to delete a web cache for a particular web page

Monday, June 28th, 2010

If you’re a web developed you probably have experience “the curse of the developer” (the web browser caching).
Web caching is really annoying if you have to test your scripts via a browser.
Therefore completely disabling the Firefox cache on firefox is a definite prerequirement before you canstart serious web development.

Here is few steps through which you can disable Firefox caching:
1. Launch your firefox browser

2. Type about:config in your browser address bar

3. Type ‘cache’ in the Filter search bar and look for the variable network.http.use-cache
Double click the network.http.use-cache variable and set it to false.
If you further want to further enable / disable the Firefox / Iceweasel web cache simply click the same variabletwice and the browser web caching will be enabled once again.

Disabling the network.http.use-cache should be also beneficial if you’re accessing the internet or any domainvia a Squid or other kinds of web proxys.

Disable firefox cache

Another handy “feature” embedded into Firefox is the reload of a page and it’s dependencies without quering thebrowser cache (that in case if the browser cache is enabled).
So if you want to temporary disable the web browser from using cache for a cetrain web page hold the SHIFT key and then press the browser reload button or holding the CTRL button + the browser reload button a quick shortcut is also available through pressing CTRL + R
This kind of temporary disable cache for a webpage goody is also available in Internet Explorer (IE) 6 and 7 as well as the MacOS X Safari and possibly other brothers too.

If it’s necessary for you to delete the web cache stored just for a particular web page then in =>Firefox 3.0.x and consider using Firefox’s Cookie Editor to start using it navigate to:

Tools –> Cookie Editor
The Cookie Editor is also available in Debian’s Iceweasel, so the explained ways to clear up cache should be also available in Linux.

Installing lm-sensors (hardware sensors) support on Intel(R) Core(TM) i7 CPU on Debian Lenny Linux to track your system hardware temperature

Sunday, June 27th, 2010

In this topic I’ll explain you step by step the exact steps I took to install lm-sensors (sensors) support on Debian Lenny GNU/Linux to work with a Quad Core Intel(R) Core(TM) i7 CPU
Normally in most hardware installing lm-sensors and running and completing a simple sensors-detect would be sufficient for lm-sensors to detect most of the system hardwares,
however since Intel i7 architecture is rather new and on the other hand Debian Lenny’s sensors kernel module and lm-sensors packages are comparatively old as Debian’s stable version releases are officially released with the approximately 2 years release cycle.
Thus albeit the usual simple way to detect with the command:

debian-server:~# sensors-detect

wasn’t able to detect any matching lm-sensors supported sensors hardware to track.

A quick google search revealed that other people are experiencing problems with configuring lm-sensors to work on Linux with the i7 intel CPU architecture and luckily some of them even succeeded.

A good forum discussions on the topic that I found were the Ubuntu forums:

lm-sensors and P6T6 WS Revolution mobo with i7 920 CPU as well as the debian.net forum thread:
Where is coretemp module?

Therefore I used the information of both of the aforementioned locations and was able to succesfully install and run the i7 Intel CPU architecture support with lm-sensors in a quick and simple way on a Debian kernel returning an uname of:
Linux debian-server 2.6.26-2-amd64 #1 SMP Tue Jan 12 22:12:20 UTC 2010 x86_64 GNU/Linuxusing the following steps:

1. Download, Compile and install a patched source of the kernel coretemp.ko module– This is an absolute requirement except which you won’t never ever be able to make the sensors work on Debian Lenny.
By the default the coretemp.ko kernel module provided with Debian Lenny prepackaged in the 64 bit kernel image in linux-image-2.6.26-2-amd64 doesn’t have an included support for the i7 intel architecture.
So procceed with downloading:
debian-server:~# wget https://pc-freak.net/files/coretemp.zip

2. Install necessary packages which will be required for a succesful compile and install of the patched coretemp.ko kernel module

debian-server:~# apt-get install build-essential gcc linux-headers-`uname -r` module-assistant lm-sensors

If you already have the lm-sensors – 1:3.0.2-1+b2 utilities to read temperature/voltage/fan sensors already installed you can remove the lm-sensors string from the up-mentioned apt-get command line.

3. Configure and Install the new patched version of coretemp.ko which will support the I7 Intel CPU architecture on Debian

debian-server:~# cd coretemp/
debian-server:/root/coretemp# m-a update
debian-server:/root/coretemp# m-a prepare
debian-server:/root/coretemp# make
debian-server:/root/coretemp# make install

You should see an output similar to if the new coretemp.ko is properly installed:

mv /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/coretemp.ko /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/coretemp.ko.old
cp coretemp.ko /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/
depmod -a

4. Load the intel i7 lm-sensors necessary kernel modules and configure the modules to be loaded on Linux System Boot

First we load the necessary modules into the kernel:

debian-server:~# modprobe coretemp
debian-server:~# modprobe w83627ehf force_id=0x8860

Next we schedule the modules to automatically load in debian boot time:

debian-server:~# echo "w83627ehf force_id=0x8860" >> /etc/modules
debian-server:~# echo "coretemp" >> /etc/modules

Now you could try out the sensors if they already report properly the CPU and system temperatures and statuses using:

debian-server:~# sensors
w83627ehf-isa-0ca0
Adapter: ISA adapter
VCore: +0.99 V (min = +0.00 V, max = +1.74 V)
in1: +6.34 V (min = +4.59 V, max = +7.66 V)
AVCC: +3.34 V (min = +3.12 V, max = +0.03 V) ALARM
3VCC: +3.34 V (min = +2.05 V, max = +2.78 V) ALARM
in4: +1.22 V (min = +0.08 V, max = +1.94 V)
in5: +0.97 V (min = +0.87 V, max = +0.35 V) ALARM
in6: +3.07 V (min = +2.71 V, max = +2.87 V) ALARM
VSB: +3.33 V (min = +2.53 V, max = +3.49 V)
VBAT: +3.28 V (min = +3.36 V, max = +2.51 V) ALARM
in9: +0.00 V (min = +0.70 V, max = +0.82 V) ALARM
Case Fan: 0 RPM (min = 1506 RPM, div = 128) ALARM
CPU Fan: 0 RPM (min = 703 RPM, div = 128) ALARM
Aux Fan: 0 RPM (min = 2636 RPM, div = 128) ALARM
fan4: 0 RPM (min = 3515 RPM, div = 128) ALARM
fan5: 0 RPM (min = 703 RPM, div = 128) ALARM
Sys Temp: +32.0°C (high = +72.0°C, hyst = -34.0°C) sensor = thermistor
CPU Temp: -31.5°C (high = +80.0°C, hyst = +75.0°C) sensor = thermis
AUX Temp: +29.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermis
cpu0_vid: +3.500 V

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +55.0°C (high = +80.0°C, crit = +100.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1: +53.0°C (high = +80.0°C, crit = +100.0)

coretemp-isa-0002
Adapter: ISA adapter
Core 2: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0003
Adapter: ISA adapter
Core 3: +52.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0004
Adapter: ISA adapter
Core 4: +55.0°C (high = +80.0°C, crit = +100.0)

coretemp-isa-0005
Adapter: ISA adapter
Core 5: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0006
Adapter: ISA adapter
Core 6: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0007
Adapter: ISA adapter
Core 7: +52.0°C (high = +80.0°C, crit = +100)

Yeah! It’s pretty handsome that lm-sensors reports the CPU system statuses for each of the Intel i7 cores 🙂
debian-server:~# unzip coretemp.zip
debian-server:~# cd coretemp/

Influence of Rock, Hard Rock, Metal, Punk and Alternative on the human mood (my personal experience in it)

Saturday, June 26th, 2010

I myself used to be a metal head for more about 10 years. During the years the amount of music swallowed varied, howeverthere was a certain tendency that I listen more and more metal. I even had a period in my life where I cannot live without metal.
The metal and alternative music slowly became my second nature. I started listening to Heavy metal and Rock music when I was 14 years old, I started with the bands: Metallica, Iron Maiden, Manowar, Motorhead, AC/DC, DIO then when some time passed I progressed further with Sepultura, Pantera, Kreator, Death etc.
Few years later my primary metal style of choice was Death metal with bands like: Morbid Angel, Cannibal Corpse, Benediction, Six Feet Under, Bolt Thrower etc. My death metal period in my life lasted for like a year and a half, then I switched to even heavier types of Metal music like Black Metal, Doom Metal etc.. I was into the darkest metal of metals for about 3 or 4 years bands like Dimmu Borgir, Venom, Bathory, Immortal, Satyricon, Darkthrone, Dark Funeral were my idols for this phase of my life.

My last phase of a “development” as a metal head was when I switched my favour metal style of choice to Gothic and Industrial metal & rock music in that times of gothic I was completely after bands like Lacrimosa, London After Midnight, Sopor Aeternus & The Ensembe of Shadows, The Cure, Crematory almost paralelly I slipped into listening to Nine Inch Nails, Front Line Assymbly, Front 242, Ministry etc.
With the years I noticed that I started getting more and more aggressive and more and more negatively pitched towards life in general (which I nowdays relate more or less with my metal background).
Probably as an effect of listening to metal, I started being more sarcastic, I started spending more time thinking of death, even at periods some suicidal thoughts started emerging.
This kind of music make me more or less apathic towards life and at the same time triggered hyper sensuality in me, which if probably analyzed by a psychologist would be ranked as a mental disored.
It was the major part of my life because all my life started turning around the music I started looking for other metal heads I started going to places where other people who are into metal gather (metal pubs, metal bars, metal clubs).
At times almost all my contacts with people were also with individuals from metal backgrounds, I started despising people with other music preferences (judging people), I also started thinking of people which are not into metal most of the time as inferior, I considered non-metal heads like a un-elightened or something.
You can imagine how insane this kind of perception of life is and how much the metal music was involved with this wrong understanding of human genesis.

With the time I realized that listening to metal music consitutes a major “disease” like condition and has a negative influence over my general life, so I decided to limit my relations with people who are into the deep metal underground and started changing my life for good when I substituted my extraordinary passion for metal for a passion for Orthodox Christian Church music and Classical Music – mostly from the Baroque Classics era.
Nowadays I do listen mostly to classical composers like J.S. Bach, Buxtehude, Antonio Vivaldi, Claudio Monteverdi and many many more

My wrong perception for the world and my behaviour alterations, my empathy towards life and people which I think were directly influenced by listening to metal music is almost gone, though the old wrong (mind and spirit) pattern remains are silently sleeping somewhere in me and looking for a ways to feed it up and to rise again.
Another negative consequence of listening to metal music was the increase in my criticism. Here I should note that my by nature I’m a critical person, however listening to metal make me even more critical and judgemental and rebellious.
As metal music in most of it’s conceptual imaginary drawings speaks about rebelion, I think it’s worthy to mention it here as one of metal’s wicked stimulus over the general metal fan.
I have to admit that it was metal music that partly kindled my interest towards religion and laters by God’s mercy led me to find the truth in the Orthodox Christian Church
Metal teaches people to leave the old ways and live a wild life without any constraints it teaches the man to turn it’s back to the old ways and look for a new order of things.
I think metal teaches man to rebel against any set government authorities and life order.
This kind of music preaches complete freedom from any normal habits, it pushes the fan to live on the edge, get the best of life, rarely talking about the consequences on the person who grasps this abnormal ways (ideas).

However like everything listening doesn’t have a 100% percents negative impact, but also has some benefits even though the benefits on the personality are quite less notable than the negative influence.
One of the major benefits of metal on man is it’s charge to sometimes show off people the real sight of things in life, it cuts the veil every now and then and does try to look for a truth, so metal could make you a truth seeker.
Another positive benefit is that many metal bands deal with a deep manners and problems the humanity faces, so listening to metal could stimulate your psyche to be think more deeply.
Last but not least is that metal deals with occult, myths and religion with that in mind, metal could trigger the listener interest into religion or occult.
It is also a music which exposes the human need for spirituality and is a good mirror of todays people corrupted spirituality.
Talking about faith, metal is about faith just like any other religion like christianity, islam or buddhism. So most people who are into metal does believe in it like into an idol that could advance them in a way.
I personally previously believed that listening to metal music, improves my thinking process and makes me smarter in a way (of course this is a delusion).
However according to modern research in certain cases it is possible that certain kind of metal has a positive impact on mind development.
Of course things aren’t so black and white, because talking about the metal genre and it’s influence I should take in mind, the music versatility.
There is a Christian Rock and Christian Metal as well as the so called White Metal which claim they do good since they preach Christianity and the “good news” of the Saviour Jesus Christ who has saved humanity from death and hell
Since the music also incorporates the good old metal riffs, my personal experience shows me that the influence of the so-called Christian Rock and Metal Music is not that beneficial as they claim, but it can easily even spread false ideas related to Christianity and implant false or heretic beliefs in Humans.

It’s an interesting fact that some of my personal experiences with metal and rock and it’s influence on my life and person does co-incide with some Research Results on the topic of metal listening.
For instance there is a quite a research on the topic of mood swings and listening to metal music, the mood swing problem should be a well known problem to many people who have been into gothic metal or alternative like Pearl Jam, Alice in Chans etc.
If you want to see some researches data results from experiments related to the effect of Metal on Human Psyche I kindly urge you to further see the below articles containing research results:
Psychology of Heavy Metal Music: Effects on Mood, Aggression, Suicide, Drug Use and Intelligence
The Effects of Heavy Metal Music on Attitude

How to Benchmark your Apache Website with siege and Apache Benchmark (ab) on Linux and FreeBSD

Friday, June 25th, 2010

I’ve recently had to benchmark a website thus I decided to share a quick way on how you can achieve a generalway to benchmark your webserver configuration and your website responce times while under heavy loads.

The first and very classical way is to use ab – the Apache HTTP server benchmarking tool

To install AB (Apache Benchmark on Debian GNU/Linux it’s rather easy), invoke:

debian-server:~# apt-get install apache2-utils

On FreeBSD ab is part of the apache port so you don’t need to install anything extra to start using is.
Further on a very basic way to test your Apache performance would be:

debian-server:~# ab -n 1000 -c 100 http://yourwebsite.com

The above command would instruct apache benchmark to make 1000 connections to http://yourwebsite.com where the connection concurrency would be of 100 parallel connections
Another possible use of the Apache Benchmark tool could be for instance:

debian-server:~# ab -kc 20 -t 30 http://yourwebsite.com/

This would instruct apache benchmark to open 20 connections and keep alive the connecitons sending requests to the Webserver for 30 seconds.

Though using AB is not a bad way to make a performance measurement under a certain loads, the results in many cases won’t be completely accurate.

For a bit more accurate performance check results I advice you to check out Siege the HTTP performance stress tester

On FreeBSD – the siege webserver benchmark tool is available via the ports tree. So the install on FreeBSD is pretty straight forward with:

freebsd-box# /usr/ports/benchmarks/siege
freebsd-box# make install cleam

Luckily the siege apache stress tester has a package available for Debian Linux, so installing if you’re following this article would come to the trivial apt-get install:

debian-server:~# apt-get install siege

On other Linux / Unix platforms you would have to download the latest siege source release and compile it via the instructions in the source archive README file.

Assuming that you succeed in installing siege, next to start using it in a very simple way to check your Website of Webserver for performance as well as get some Benchmarking on how it operates under different amount of user connections you can execute something like:

debian-server:~# siege -b -c 100 -r 10 http://yourwebsite.com

This will benchmark the http://yourwebsite.com website running on top of your webserver of choice, running with 100 concurrent connections to the website, running the test in a loop 10 times.

By default all output from the siege Apache benchmarking tests would be logged in the ouput file /var/siege.log
Another handy opportunity siege provides is the ability to check a number of provided website url address via the -f option.

There possibly a number of other valuable tools to benchmark your Webserver (Apache or the webserver type you use), however I belive this twos should be enough for most benchmarkers out there.

How to auto load kernel module on system boot in CentOS 5

Thursday, June 24th, 2010

If you’re in need to auto load a kernel module during boot time on CentOS 5 Linux, but you want to do it in the “proper way” instead of placing it directly into the good old /etc/rc.local .
Then it might be a good idea to know that CentOS is loading it’s kernel modules using the wrapper script /etc/rc.sysinit
In that script there is a small for loop which instructs the system to load all scripts located in the /etc/sysconfig/modules/ directory.
Thereafter a quick way to include a new kernel module to auto boot up on startup could be accomplished through:

echo "modprobe somemodulename" > /etc/sysconfig/modules/somemodulename.modules
chmod +x /etc/sysconfig/modules/somemodulename.modules

Here I’ll illustrate with a real life example, let’s say you’re in need to auto lood during server boot process the kernel module softdog which is a must have in most Linux hardwares since they don’t include a hardware watchdog equipped with it.

Execute the commands below to instruct your CentOS to autoload the softdog kernel module next time on boot:
[hipo@centos-server ~]# echo -e '#!/bin/shnMODULES="softdog' > /etc/sysconfig/modules/softdog.modules
[hipo@centos-server ~]# echo -e "for i in $MODULES ; donmodprobe $i >/dev/null 2>&1; done" >> /etc/sysconfig/modules/softdog.modules
[hipo@centos-server ~]# echo "modprobe watchdog" >> /etc/sysconfig/modules/softdog.modules
[hipo@centos-server ~]# chmod +x /etc/sysconfig/modules/softdog.modules

To also load the same module immediately use modprobe

[hipo@centos-server ~]# /sbin/modprobe softdog

This kind of approach to the problem should also work in other Redhat based Linux distributions like Redhat, Fedora, RHEL etc.
A similar article to this could be seen on The really right, modern and clean way to load modules in CentOS 5

Vpopmail Virtual domain post installation config and tuning of quotas and domain aliases

Wednesday, June 23rd, 2010

Many qmail+vpopmail install tutorials online give a good insight on how to install vpopmail on top of a qmail mail server.
However very few of them explain on how to setup and configure the basic vpopmail policy concerning new user creations.
For instance have you ever wondered how can you configure your vpopmail to create all new users by default with a quota limitation of 500MB?
I bet you have.

In this small post I’ll discuss on how to setup (configure) the default policy concerning user creation of new virtual domain users in vpopmail.

1. In order to configure the maximum amount of new created users quota and the maximum number of messages a user mailbox may hold in vpopmail you should edit ~vpopmail/etc/vlimits.default

debian-server:~# vim ~vpopmail/etc/vlimits.default
Then put in the vlimits.default file:

# 500MB
default_quota 524288000
# maximum number of messages in a mailbox
default_maxmsgcount 10000

The above two vpopmail vlimits.default configuration directives are to set your new usernames user@yourvirtualdomain.com to default_quota of 500 MB, which I suppose in most cases would be enough for most users, it will also set the maximum numbers in a mailbox to be equal to 10000 mail messages

2. Furthermore it’s necessary that we create .over-quota.msg and the .quotawarn.msg

debian-server:~# touch /var/vpopmail/domains/.quotawarn.msg
debian-server:~# touch /var/vpopmail/domains/.over-quota.msg

Put in .quotawarn.msg something similar to the text:

From: Postmaster <postmaster@mydomain.org>
Reply-To: postmaster@mydomain.org
Organization: My Organization
To: User:;
Subject: Mail quota exceeding
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1251
Content-Transfer-Encoding: 8bit

Dear User,

The size of your mailbox has exceeded a warning threshold,
that is set by the system administrator.

Please contact our IT Department:

email:me@mydomain.org
Tel.: +359 (42) 601694

Thereafter, it’s a necessity to put in the .ovar-quota.msg the text

Message rejected. Not enough storage space in user's mailbox to accept message.

Having done that we need to set the proper permissions for the newly created files:
debian-server:~# chown vpopmail.vchkpw /var/vpopmail/domains/.*msg

Note that if your vpopmail is installed in a different location than the default one /var/vpopmail it will be required that you set the proper location in the touch and chown commands foreshown above.

Then it’s probably idea to add a mail alias if your mail server domain is mail.example.net and your primary mail vpopuser domain is example.net issue the command:

debian-server:~# /var/vpopmail/bin/vaddaliasdomain mail.example.net example.net

Tt’s an interesting fact that I mistakenly did the domain alias the other way around with a command:debian-server:~# /var/vpopmail/bin/vaddaliasdomain example.net mail.example.net

instead of

debian-server:~# /var/vpopmail/bin/vaddaliasdomain mail.example.net example.net

I therefore wanted to reverse the alias in order to instruct vpopmail’s virtualdomain alias to be from mail.example.net to point to example.net.
Fortunately I found out that actually the domain alias though my wrongly inverted syntax has added itself the domain alias in a correct way, I got that by checking the domain information with /var/vpopmail/bin/vdominfo

Problems during installation of OpenX on Debian Lenny Linux and their solutions

Tuesday, June 22nd, 2010

If you’re installing openx on a Debian Linux, you will most probably be forced to note/change few things before the openx installation launches correctly:

Here are a list of things to check and assure are properly configured before you procceed1. If you use the disable_functions, it’s recommended to comment it out during the openx installation:
#disable_functions =exec,passthru,shell_exec,system,
proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source

2. Increase memory_limit to at least 128MB this is a minimum requirement for openx to run properly:
Edit your /etc/php5/apache2/php.ini and set memory_limit to:
memory_limit = 192M

3. Set the date.timezone in your /etc/php.ini

You need to properly set the date.timezone function in Apache’s php.ini othewise the OpenX installation will refuse to continue with a warning:

timezoneOpenX has detected that your PHP installation is returning ‘System/Localtime’ as the timezone of your server. This is because of a patch to PHP applied by some Linux distributions. Unfortunately, this is not a valid PHP timezone. Please edit your php.ini file and set the ‘date.timezone’ property to the correct value for your server.

It took me a while until I found the proper way to set the date.timezone php variable, below is a correct way to set the date.timezone in php.ini:

echo 'date.timezone = Europe/London' >> /etc/php5/apache2/php.ini

Note that many people has provided a misinformation concerning the setup of date.timezone on php version 5.2 or 5.3.
Many posts online claim that the date.timezone should be set with date.timezone = “Europe/London” having the quotation marks is variable syntax error so if you enter it that way in your php.ini the date.timezone variable won’t be set correctly.
Some people on the net has also suggested that date.timezone variable format is in the form date.timezone = “US/Central” which I suspect is again erroneous.

Actually the Openx system requirements has a nice explanation on how to properly set the date.timezone in order to fix any emerging issues with the OpenX install, so I suggest you take 5 minutes time and read thoroughly before you start with the OpenX installation.