How to Install XCache for PHP 5 on CentOS

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce server load.

Download xcahce:

cd /opt
wget tar -zxvf xcache-2.0.1.tar.gz
cd xcache-2.0.1

Use yum to install the PHP compile tools, if you can have installed before, skip this step

yum -y install php-devel yum install -y gcc make

继续阅读How to Install XCache for PHP 5 on CentOS

CentOS安装php加速软件Zend Guard

说明:PHP5.3以上的版本不再支持Zend Optimizer,已经被全新的 Zend Guard Loader 取代,下面是安装Zend Guard具体步骤,以下操作均在终端命令行执行

1、下载Zend Guardcd /home

# wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz #32位
# wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz #64位

2、安装Zend Guard

# mkdir /usr/zend #建立Zend Guard安装目录
# tar xvfz ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz #解压安装文件
# cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /usr/zend/ #拷贝文件到安装目录
# rm -rf /home/ZendGuardLoader-php-5.3-linux-glibc23-i386* #删除安装包

继续阅读CentOS安装php加速软件Zend Guard

CentOS安装php加速软件Zend Optimizer 3.3.9

引言:

php程序代码被加密过后,必须安装解密软件Zend Optimizer才能进行使用,比如Shopex等php程序,下面我们安装Zend Optimizer 3.3.9(针对php5.2,X之前的版本,php5.3.X需要安装Zend Guard),操作如下:

1、下载Zend optimizer</span>

cd /home
wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz #32位
wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz #64位

继续阅读CentOS安装php加速软件Zend Optimizer 3.3.9

Auto Completing of gvim/vim for PHP

When I try to use vim to code, I found it’s lack of auto completing. Well, I got a solution for that. Please consolt the below information for tails.

Installation:

  1. Download the function list file : http://cvs.php.net/viewvc.cgi/phpdoc/funclist.txt

  2. Copy function list file to installation path of vim.

  3. Add the following code to the end of vimrc:

     "You can obtain the completion dictionary file from:
     "http://cvs.php.net/viewvc.cgi/phpdoc/funclist.txt
     set dictionary-=$VIM/funclist.txt dictionary+=$VIM/funclist.txt
    
     "Use the dictionary completion
     set complete-=k complete+=k
    
     "Auto completion using the TAB key
     "This function determines, wether we are on
     "the start of the line text(then tab indents)
     "or if we want to try auto completion
     function! InsertTabWrapper()
     let col=col(‘.’)-1
     if !col || getline(‘.’)[col–1] !~ ‘k’
     return “<TAB>”
     else
     return “<C-N>”
     endif
     endfunction
    
     "Remap the tab key to select action with InsertTabWrapper
     inoremap <TAB> <C-R>=InsertTabWrapper()<CR>
    

And pay attention on $VIM,that’s your vim’s config directory.