Archive for the PHP Category

mcrypt installation on php5.3.x

If you want to install PHP-mcrypt extension with PHP 5.3.3 or PHP 5.3.x version then follow the below simple steps ::

 [email protected][#] yum install php-devel libmcrypt libmcrypt-devel gcc gcc-c++
 [email protected][#] yum install php53-devel libmcrypt libmcrypt-devel gcc gcc-c++
 [email protected][#] cd /usr/local/src/
 [email protected][#] wget
 [email protected][#] tar -zxvf php-5.3.3.tar.gz
 [email protected][#] cd php-5.3.3/ext/mcrypt/
 [email protected][#] phpize
 [email protected][#] aclocal
 [email protected][#] ./configure
 [email protected][#] make
 [email protected][#] make test
 [email protected][#] make install

Continue reading mcrypt installation on php5.3.x

mod_suphp installation on Plesk 11

suPHP is a tool for executing PHP scripts with the permissions of their owners rather than Apache user and hence improves server security.

Below are the pros and cons of SuPHP

Pros ::

  • PHP runs as your user/group
  • Max File permission of  644 and max folder permisson of 755 required to execute PHP files
  • Files/folders written by PHP are written as account user/group instead of Apache user
  • Allows you to configure custom php.ini for each account


  • Slower than mod_php
  • PHP variable settings will no longer work from .htaccess files

Installation ::

Setup the RPMforge repo

for Centos 6.x 64 bit

rpm -ivh

for Centos 6.x 32 bit

rpm -Uvh

Now you can install mod_suphp via yum

yum install mod_suphp

Continue reading mod_suphp installation on Plesk 11

/usr/bin/php: error while loading shared libraries:

While enabling PHP SuPHP handler  on one of my server, I  started to get 500 Internal Server Error for all php pages .

So, my initial reaction  was to check  the Permissions and Ownerships for all PHP  files as while enabling PHP SuPHP  the max file permissions should be 644 and max folder permissions should be 755 and all  php files should ran under the ownership of user.user instead of apache.apache.

Also, I have checked all .htaccess files to see any one of the contains PHP flags like php_flag or php_admin_value as while enabling PHP SuPHP all PHP flags defined under .htaccess files will  result in a   500 Internal Server Error .

But after checking all the above, I  started to wonder as to what it could be  and then I realized  that it could be the RLimitMEM and RLimitCPU defined in the httpd.conf file and after disabling those values all the PHP  pages started to  work like a charm. 
Continue reading /usr/bin/php: error while loading shared libraries: