Category : PHP

Here is a simple lamp install script for CentOS 8. #!/bin/bash #update system dnf update #install apache dnf install httpd httpd-tools -y systemctl enable httpd systemctl start httpd systemctl status httpd #update firewall firewall-cmd –permanent –zone=public –add-service=http firewall-cmd –permanent –zone=public –add-service=https firewall-cmd –reload #install mariadb dnf install mariadb-server mariadb -y systemctl start mariadb systemctl enable ..

Read more

When needing to run a command in a different version on php. Where is the path to php 7 on cpanel? # /opt/cpanel/ea-php70/root/usr/bin/php -v PHP 7.0.32 (cli) (built: Sep 14 2018 20:36:03) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies How to specify command line command ..

Read more

Check settings in plesk: Tools and Settings > General > PHP Settings. Click on a php version: Through the OS vendor (CentOS 7 PHP 5.4.16 OS Vendor) Connect to the server via SSH; Install the pre-compiled extension packages: .rpm-based distribution (CloudLinux, CentOS, RHEL): # yum install -y epel-release # yum install -y php-pecl-ssh2 .deb-based distribution ..

Read more

How to replace php 5.4 with php 5.6. Before installing PHP 5.6, apply any existing updates available for your distribution: # yum check-update # yum update Also, this is a good moment to get (and save somewhere) a list of our installed packages (in case we need to rollback): # rpm -qa |grep php php-mbstring-5.4.16-36.1.el7_2.1.x86_64 ..

Read more

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

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

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

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 Rest..

Read more