How to Edit Your php.ini File on cPanel

On systems that run EasyApache 3, the /usr/local/lib/ directory contains your server’s php.ini file. On systems that run EasyApache 4, multiple php.ini and local.ini files manage your system’s PHP. Each version of PHP on your systems uses its own php.ini and local.ini file. You must make changes to each file separately. On systems that run Read more about How to Edit Your php.ini File on cPanel[…]

Install xcache

CentOS 6 # yum install php-xcache xcache-admin Debian/Ubuntu/Linux Mint # apt-get install php5-xcache Configure RHEL/CentOS/Fedora # nano /etc/php.d/xcache.ini Debian/Ubuntu/Linux Mint # nano /etc/php5/conf.d/xcache.ini OR # nano /etc/php5/mods-available/xcache.ini once you’re done with configuration settings, restart your Apache web server. # /etc/init.d/httpd restart # /etc/init.d/apache2 restart Verify # php -v Enabling XCache Admin Panel for PHP By Read more about Install xcache[…]

Downgrade PHP 7 to PHP 5.6 on Ubuntu 16.04 Xenial

How to install PHP 5.6 on Ubuntu 16.04 Xenial and replace php 7. Let’s assume you have a fresh Ubuntu 16.04 server. Install add-apt-repository: # sudo apt-get install python-software-properties Add repository for PHP 5.6: # sudo add-apt-repository -y ppa:ondrej/php Update package lists: sudo apt-get update Install php5-fpm: # sudo apt-get install php5.6-fpm Check the result: Read more about Downgrade PHP 7 to PHP 5.6 on Ubuntu 16.04 Xenial[…]

APC on Cpanel

Install APCu. APC is not supported after php 5.4 Edit php.ini extension=”apcu.so” ; APC Configuration apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 128M apc.max_file_size = 2M apc.ttl = 7200 apc.user_ttl = 7200 apc.num_files_hint = 1024 apc.enable_cli = 1 Restart apache

Posted in PHP

Install Apache, Mysql and PHP on Ubuntu 14.04

How to install Apache, MySQL and PHP on Ubuntu 14.04 Update # sudo apt-get update Apache # sudo apt-get install apache2 Install MySQL # sudo apt-get install mysql-server php5-mysql # sudo mysql_install_db # mysql_secure_installation Install PHP # sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt Restart Server # sudo /etc/init.d/apache2 restart Check Apache Open a web browser Read more about Install Apache, Mysql and PHP on Ubuntu 14.04[…]

Php 4 on cpanel

Here are a few articles that mention it: https://documentation.cpanel.net/display/EA/Custom+Modules https://forums.cpanel.net/threads/how-to-easy-php4-php5-side-by-side-after-removal-of-php4-from-easyapache.304942/ The End of PHP 4 https://www.siteground.com/kb/how_to_have_different_php__mysql_versions/ You can set the handler for the site using a .htaccess file in the domains webroot with the following contents: Code: AddHandler application/x-httpd-php4 .php .php4 .php3

PhalconPHP

Installation Clone this repository into /var/cpanel/easy/apache/custom_opt_mods/ like so: # cd /var/cpanel/easy/apache/custom_opt_mods/ # git clone https://github.com/thecpaneladmin/EA-PhalconPHP.git . # /scripts/easyapache Git on cpanel is at # /usr/local/cpanel/3rdparty/bin/git Or use the .zip: # cd /usr/src # wget https://github.com/thecpaneladmin/EA-PhalconPHP/archive/master.zip # unzip -d /var/cpanel/easy/apache/custom_opt_mods/ master.zip # /scripts/easyapache Make sure that the path is /var/cpanel/easy/apache/custom_opt_mods]# ls -la drwxr-xr-x 4 root root Read more about PhalconPHP[…]

White Screen of Death (WSOD) in php page

You must turn on PHP error reporting. To do this, you should change the setting in your php.ini config file. Temporarily insert the following lines in your index.php file: error_reporting(E_ALL); ini_set(‘display_errors’, TRUE); ini_set(‘display_startup_errors’, TRUE); Make sure that you have inserted the code directly after the opening PHP tag. The errors should now appear directly on Read more about White Screen of Death (WSOD) in php page[…]

Posted in PHP

Imagemagick on CentOS and Plesk

root@server ~]# yum install ImageMagick [root@server ~]# yum install ImageMagick-devel PHP-imagick Installation: [root@server ~]# yum install gcc [root@server ~]# yum install make automake [root@server ~]# yum install php-pear [root@server ~]# yum install php-devel [root@server ~]# pecl install imagick On some servers yum install php-pecl-imagick.x86_64 Test: convert image.jpg -resize 64×64 resize_image.jpg