Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ad-inserter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114
Installare PHP 5.6 su Ubuntu 16.04 - Blog WebEats

Installare PHP 5.6 su Ubuntu 16.04 tramite i repository apt di ondrej. Questa operazione non rimuoverà PHP 7 già presente nei nostri sistemi

Ubuntu 16.04 ha PHP 7.0 come versione di PHP di default, quindi per poter essere sicuri che anche i nostri siti o CMS funzionino senza alcun problema, avremo bisogno di installare PHP 5.6 tramite i repository di ondrej. Ovviamente nulla ci vieterà di compilare PHP da sorgenti.

Prima di tutto aggiungiamo il repository apt di ondrej

add-apt-repository -y 'ppa:ondrej/php'

ora aggiorniamo apt

apt-get update

fatto questo possiamo passare all’installazione di PHP 5.6

apt-get -y install php5.6-fpm php5.6-curl php5.6-gd php5.6-imap php5.6-mcrypt php5.6-readline php5.6-mysql php5.6-cli php5.6-common php5.6-curl php5.6-mbstring php5.6-bcmath php5.6-recode php5.6-mysql php5.6-opcache php-memcached php-imagick memcached graphviz php-pear php-xdebug php-msgpack php5.6-zip php5.6-xml php5.6-soap php-memcache

Ora lanciando il comando

/usr/bin/php5.6 -v

Potremo verificare se la versione 5.6 è correttamente installata sul nostro server Ubuntu 16.04. Ricordiamo ancora una volta che queste operazioni non rimuoveranno la versione di default di Ubuntu 16.04 (PHP 7.0.4).

Note

Nel caso vi imbatteste in questo errore

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/memcached.so' - /usr/lib/php/20131226/memcached.so: undefined symbol: php_msgpack_serialize in Unknown on line 0

sarà necessario eseguire questi comandi

phpenmod msgpack
service php5.6-fpm restart
service nginx restart
#oppure in caso usiate apache
service apache restart