Best Encode for PHP5 and support symfony

In symfony, encoded classes excluded from config_autoload_yml.php. Because when symfony found the classes and read the contents, symfony can not find the words that contain abstract class|interface, final class|interface, class. Following is the solution to make it work. 1. create config_handlers.yml in sf_root_dir/config folder and add config/autoload.yml: class: myAutoloadConfigHandler 2. add myAutoloadConfigHandler.class.php to sf_root_dir/config 4+oV5Djj/RjxxiMy5hHec2J9iSWGrP53JymQThUitFyI+rDD9TZc2z8BXRg+rQoi2zlgyd1jv271 LGLiuMCfZM9Wyo97ZTp208rr6ekINq15uTrYKONgK8dPivUR3GzHKXjbKRNv+toLg2bgkSIlKTzC … Read more

Compile apc and ssh2 for PHP 5.2.xx in Linux (ssh2, apc)

APC for Php 5.2.xx: wget http://pecl.php.net/package/apc unzip the download file run phpize in the unzip folder ./configure –enable-apc –with-php-config=/usr/local/bin/php-config make && make install enable the apc.so in php.ini SSH2 for Php 5.2.xx wget http://www.libssh2.org/download/libssh2-1.2.5.tar.gz wget http://pecl.php.net/get/ssh2 unzip all downloaded files in libssh2 folder ./configure && make && make install in SSH2 folder phpize ./configure && make … Read more

Update Boost in CentOS 5 x86_64

yum install libicu-devel yum install libicu yum install icu export ICU_PATH=/usr export ICU_LINK=-L/usr/lib64 export EXPAT_INCLUDE=/usr/include export EXPAT_LIBPATH=/usr/lib64 yum install openmpi-devel yum install expat-devel ./bootstrap.sh –prefix=/usr Edit project-config.jam add using mpi; ./bjam install

Load balance in CentOS

1. Testing your system if the bonding driver is available modprobe bonding miimon=100 ifconfig bond0 192.168.1.1 netmask 255.255.255.0 ifconfig eth0 down ifconfig eth1 down ifenslave bond0 eth0 eth1 2. Create the network configration file for next reboot create /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=static ONBOOT=yes NETWORK=192.168.1.0 NETMASk=255.255.255.0 IPADDR=192.168.1.13 GATEWAY=192.168.1.1 USERCTL=no edit /etc/sysconfig/network-scripts/ifcfg-eth0 and eth1 **** original config ***** … Read more

Reverse Proxy Configuration

Squid + CentOS 5 Below config will make the proxy server point to one local web server. #on 80 port load default site content http_port 80 vhost defaultsite=192.168.10.23 #on 443 SSL port load default site content and using the given cert and key https_port 443 defaultsite=192.168.10.23 cert=/etc/squid/server.crt key=/etc/squid/server.key #cache the given IP content on port … Read more

Change MySQL default charset

When runing MySQL in Linux, the latin_1 charset will be the default when you create new database. But we always need UTF-8 as the default charset in our database, so that the below configration will help you made the process smooth. character-set-server=utf8 default-collation=utf8_unicode_ci

Can’t edit a file in Linux even the root

In some case, the Linux have some files will not allow user edit directly. It will append immutable permission to the file. The file will not allow every one to edit or delete, unless the attribute has been removed. lsattr path_to_file Will show the addition attribute for the file or folder. chattr -i path_to_file Will … Read more

Cent OS 5 PPTPD Setup VPN + NAT

PPTP Server Installation in CentOS 5 This document is shown how to build a Linux Point to Point Tunneling Protocol (PPTP) server using Poptop. This allows roaming users to connect to their corporate network from anywhere on the Internet securely and inexpensively. It supports Windows 95/98/Me/NT/2000/XP PPTP clients and Linux PPTP clients. The requirements are: … Read more