How to set PHP Handler on EA4

There are four PHP handlers available on cPanel servers : DSO, suPHP, FastCGI, CGI

The below command will list all the available handlers on the server :

COMMAND : /usr/local/cpanel/bin/rebuild_phpconf –available

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf –available
ea-php54: cgi none
ea-php55: cgi none
ea-php56: cgi none
ea-php70: cgi none

Run the below command to check the current PHP handler on the server

COMMAND : /usr/local/cpanel/bin/rebuild_phpconf –current

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf –current
DEFAULT PHP: ea-php56
ea-php54 SAPI: cgi
ea-php55 SAPI: cgi
ea-php56 SAPI: cgi
ea-php70 SAPI: cgi

Read the rest of this entry »

How to install PHP module/Extension on EA4

Install PHP curl extension

Run the command yum install “ea-phpXX-php-curl” to install curl

Command to Install curl for PHP version 5.4 : yum install ea-php54-php-curl
Command to Install curl for PHP version 5.5 : yum install ea-php55-php-curl
Command to Install curl for PHP version 5.6 : yum install ea-php56-php-curl
Command to Install curl for PHP version 7.0 : yum install ea-php70-php-curl

Install zlib, core, ctype, date, ereg

Run the command “yum install ea-phpXX-php-common” to install zlib PHP module

Command :

yum install ea-php54-php-common
yum install ea-php55-php-common
yum install ea-php56-php-common
yum install ea-php70-php-common

Read the rest of this entry »

Install Apache+PHP on CentOS server

Step 1 – Login to your server

Step 2Install Apache web server on CentOS. Issue following command:
yum install httpd

Step 3Install PHP5 and common PHP module. The most basic command to install latest PHP version is following:
yum install php

That’s it. Now you have Apache and PHP5 installed. But wait, talking about PHP module, there are several most common modules available you may wish to install as well. Use the following command

yum install php-mysql php-common php-cli php-devel php-fpm php-gd php-imap php-intl php-mysql php-process php-xml php-xmlrpc php-zts

Step 4 – Finally restart the Apache web server so it can reload appropriately:

service httpd restart

Step 5 – This very last step is not a must but recommended: adding Apache to start up list. Each time you reboot your server PHP will start automatically but not with Apache. Issue command below to make it start each time whenever the server reboots:

chkconfig httpd on

Congratulation. What’s next? You can give it a test by accessing your server in your browser via its IP address