If server has default config set not to show the errors use this at the begining of your php file:

error_reporting(E_ALL);
ini_set(’display_errors’, ‘1′);

, , ,

1. If a method can be static, declare it static. Speed improvement is by a factor of 4.

2. Avoid magic like __get, __set, __autoload

3. require_once() is expensive

4. Use full paths in includes and requires, less time spent on resolving the OS paths.

5. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()

6. See if you can use strncasecmp, strpbrk and stripos instead of regex

Read the rest of this entry

, , , ,

1. type “nautilus” into a terminal

2. in the edit menu select PREFERENCES

3. under ICON VIEW DEFAULTS  and LIST VIEW DEFAULTS  change the zoom level to 66%  /  50 % or …

4. DONE!

, ,

Here is a short tutorial that will help you to have a working vpn server.

First you need to install OpenVPN from sources or precompiled distro packet.

Then you need to setup of the Certificate Authority (CA)

Keep in mind that the CA should be on client not on the the server. OpenVPN install comes with scripts that can easy create certificates. You should copy them in to /etc/openvpn:

cp -a /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn

Read the rest of this entry

The following are the steps I took to get php5+gd+mysql support (in parallel with the default install of php) working with my Plesk hosted sites on FC2. Hopeful it might help someone else.

mkdir /usr/local/php5libpng
cd /usr/local/php5libpng

yum install zlib-devel

wget http://kent.dl.sourceforge.net/sourc…-config.tar.gz
gunzip libpng-1.2.8-config.tar.gz
tar -xvf libpng-1.2.8-config.tar

Read the rest of this entry

,