Software

From coopzone
Jump to navigation Jump to search

php 5.3.x date problems

Many php apps written for php5.2 use date functions that rely on the system having the correct timezone. In php 5.3 it no longer trusts the machine timezone, so you have to add it to the php.ini file:

php.ini to include date.timezone = 'Europe/London'

Building php with imap support

Mostly for use with squirrelmail.

Install the dependencies (centos version, use apt-get on debian):

yum groupinstall "Development Tools"
yum install openssl-devel  krb5 krb5-devel pam-devel

1) Create a temporary folder and cd to it.

mkdir ~/php-imap && cd ~/php-imap

2) Download c-client.tar.Z

wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z

3) Extract the c-client.tar.Z file, which would create the imap-2007e folder at this moment.

tar -zxf c-client.tar.Z 

4) Download php source code form php.net.

5) Go to the imap-2007e folder and edit the Makefile such that the 'EXTRACFLAGS=' line reads: 'EXTRACFLAGS=-fPIC'

6) Compile c-client.

make lr5  IP6=4

7) Go to the php source folder and run the configure script with the following arguments:

./configure --disable-all --with-imap=shared,<path to imap-2007e folder> --with-imap-ssl --with-openssl=/usr

Add in all the other things you need

8) Compile php

make; make install

9) Restart Apache

/etc/init.d/httpd restart