Howto: Install PDFlib-Lite and PDFlib on Centos server

To install PDFlib on Centos server, you may follow the guide below,

1. Download the PDFlib-Lite package,

cd /usr/local/src 

2. Extract and go to PDFlib-Lite folder,

tar -zxvf PDFlib-Lite-7-* 
cd PDFlib-Lite-7.0*

3. Configure PDFlib-Lite,

./configure --prefix=/usr/local

4. Create installation file and install it,

make install

5. Once PDFlib-Lite installed, download PDFlib with PECL,

pecl download pdflib

6. Extract and enter the folder,

tar xvzf pdflib-*.tgz 
cd pdflib-*

7. Create configuration file,


8. Configure, create configuration file and install PDFlib,

make install

9. A will be created in your PHP extension folder, check it from PHP info,

php -i | grep extension_dir

10. If it is not exists, add the following line to the php.ini,


Configure FastCGI to Host PHP from IIS 5.x and 6.x

I want to tell everybody that I am back again after last post from Jan 2011. MGe is lost after the Celebrating the Chinese New Year(I am Chinese, 🙂 ), and it is very sad that 2 relative passed away during the past week. 🙁

Somehow, I will continue sharing my post from here, :-).

Today, I want to guide my reader on how to configure PHP FastCGI for IIS 5.x and 6.x.

i) IIS5.x or 6.x installed.
ii) PHP installed.

Install FastCGI extension,
1. Download the extension from
2. Install it and you will see it is installed to C:\Windows\System32\inetsrv folder.

Apply FastCGI extension,
i) Configure through command,
Run the follow command,

cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"

ii) Manually Configure it.
1) Run inetmgr.
2) Right click Web Site and select properties.
3) Click on Home Directory tab.
4) Click on the Configure button.
5) Click on the Add button.
6) In the “Add/Edit Application Extension Mapping”, add the following information,
Executable: C:\Windows\System32\inetsrv\fcgiext.dll
Extension: .php
Verbs: Limit to GET, HEAD, POST
7) Click OK.

Modify the fcgiext.ini file,
1) Add the following information to the fcgiext.ini file,

Set the optimal setting for FastCGI,
Set the following value to php.ini,
fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

Set the following value to fcgiext.ini, run the following script.

cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000

Install Memcache with cPanel that running CentOS

I was trying to install Memcache from cPanel from yesterday night but it seems to be sucks when installing from cPanel control panel.

Hence, I am sharing the step as below which I used to compiled manually from the shell.

Create a temporary folder
1. As it is a manually work, you might want to clear the source file after the installation, so create a folder as command below.

mkdir ~/memcache

Install LibEvent
To install memcache, you will need LibEvent, go to their site to get the latest version.

cd ~/memcache
tar zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
make install

Install Memcache
Now, install the memcache and get the latest version from their site.

cd ~/memcache
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-lib-event=/usr/local/
make install

Install PHP Memcache
Now, install PECL Memcache and get the latest version.

cd ~/memcache
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
make install
vi /usr/local/lib/php.ini

Find the extension as below and if it is not existed, add it in the php.ini.

Restart the Apache services.

service httpd restart