EE 3.8.1 w/Ubuntu 18.04 and PHP72


#1

The goal was to get PHP updated to 7.2.

I updated my Ubuntu 16.04 installation to Ubuntu 18.04.

EE is version 3.8.1

I was under the impression that Ubuntu 18.04 would contain PHP 7.2, but once these updates were complete, my PHP installation was still plain PHP 7.0.33-5+ubuntu16.04.1.

Apparently php7.2 never installed on my system.

Can someone please help me with how to get my PHP updated to 7.2 (preferably without breaking anything).

Please. Thank you!


#2

Hello,

you can follow my guide to configure PHP 7.2 with EasyEngine v3 :

But site creation with php7.2 will not be automated with EEv3. I suggest you to migrate to WordOps (EEv3 fork) as soon as the stable release is available.


#3

Thank you. My main concern (and reason for help / advice) has been that I want to avoid breaking the existing installation by the upgrade.

I’m not too worried about Wordpress - this server is dedicated to a straight PHP website (Invision Community Forum) and isn’t running Wordpress - but thank you for the head’s up.


#4

Also, the WordOps website / domain has been offline for a month. Do you know if that will be fixed?


#5

Hello @ZinkDifferent,

we are currently working on the script to automate migration from EasyEngine v3 to WordOps and our main concern is to make the migration simple and without downtime. That’s why the script will not overwrite previous nginx configurations and will not remove previous php versions.

wordops domain should be back online soon (otherwise we will probably choose another domain extension to replace the current .org )


#6

Let me know if you need any help with the domain or the hosting. I can help.


#7

So, this errors out at:

cp -rf $HOME/ubuntu-nginx-web-server/etc/php/7.2/fpm/* /etc/php/7.2/fpm/

This is what I get:

cp: cannot stat ‘/root/ubuntu-nginx-web-server/etc/php/7.2/fpm/*’: No such file or directory

Your instructions basically have faults in them.


#8

Also:

PHP Warning: PHP Startup: Unable to load dynamic library ‘memcache.so’ (tried: /usr/lib/php/20170718/memcache.so (/usr/lib/php/20170718/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20170718/memcache.so.so (/usr/lib/php/20170718/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0


#9

Finally, while php -v now shows that it is running php 7.2, the installed web-site still runs under php 7.0.

Both php -v and php7.2 -v show 7.2 as the active php - but the site hasn’t changed.

This is a regular php based site (not wordpress). Any suggestions?


#10

I have solved this error/problem – but am still left with it not selecting php7.2 for my active PHP site.


#11

Hello,

you have to edit your vhost and to replace :

include common/php7.conf;

with

include common/php72.conf;

That’s what I meaned when I said

site creation with php7.2 will not be automated with EEv3

WordOps isn’t fully ready for production (mostly because I haven’t run enough tests) but the main features (install nginx, mysql, php, install wp) are working properly with php7.2 by default or php7.3.
So it’s probably a better idea to install wordops now, instead of trying to update EEv3.


#12

OK, and when I do that, what you just suggested, I get an error when restarting Nginx:

systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-03-18 00:28:12 PDT; 10s ago
Process: 6788 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 32366 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 6789 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 32367 (code=exited, status=0/SUCCESS)

Mar 18 00:28:12 chicabow.fizbin.com systemd[1]: Starting A high performance web server and a reverse proxy server…
Mar 18 00:28:12 chicabow.fizbin.com nginx[6789]: nginx: [emerg] open() “/etc/nginx/common/php72.conf” failed (2: No such file or directory) in /etc/nginx/sites-enabled/chicabow.com:19
Mar 18 00:28:12 chicabow.fizbin.com nginx[6789]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 18 00:28:12 chicabow.fizbin.com systemd[1]: nginx.service: Control process exited, code=exited status=1
Mar 18 00:28:12 chicabow.fizbin.com systemd[1]: nginx.service: Failed with result ‘exit-code’.
Mar 18 00:28:12 chicabow.fizbin.com systemd[1]: Failed to start A high performance web server and a reverse proxy server.


#13

Check your PM please - I need some help.


#14

Hello,

you have to run the following command to create the missing nginx configurations

wo stack install

#15

OK.

I did.

wo stack install
PHP 7.2 already installed
MySQL connection is already alive
WP-CLI is already installed
Downloading phpMyAdmin [Done]
Downloading Adminer [Done]
Downloading phpMemcachedAdmin [Done]
Downloading clean.php [Done]
Downloading opcache.php [Done]
Downloading Opgui [Done]
Downloading OCP.php [Done]
Downloading Webgrind [Done]
Downloading pt-query-advisor [Done]
Downloading Anemometer [Done]
Destination path ‘/var/www/22222/htdocs/db/pma/phpmyadmin-STABLE’ already exists

Still, the same issue:

service nginx restart
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

Relevant error:

nginx: [emerg] no port in upstream “php72” in /etc/nginx/common/locations.conf:63

For some reason the upstream configurations are missing.


#16

Probably has something to do with the Nginx-ee script failing?

Welcome to the nginx-ee bash script v3.5.2

##################################
Compilation summary
##################################

Detected OS : Ubuntu 18.04.2 LTS
Detected Arch : x86_64

  • Nginx release : 1.15.9

  • Dynamic modules NO

  • Pagespeed : NO

  • Naxsi : NO

  • RTMP : NO

  • EasyEngine : YES

  • WordOps : YES

    Installing dependencies              [FAIL]
    

    Please look at /tmp/nginx-ee.log

(FYI – Nginx-ee.log is empty – so, not helpful)


#17

At first copy the php7.2 pool configuration from the repository ubuntu-nginx-web-server :

cp -rf $HOME/ubuntu-nginx-web-server/etc/php/7.2/fpm/* /etc/php/7.2/fpm/
service php7.2-fpm restart

Then overwrite upstream.conf :

cp -f $HOME/ubuntu-nginx-web-server/etc/nginx/conf.d/upstream.conf /etc/nginx/conf.d/upstream.conf

It should fix the current issue.


#18

YAY!

That did it – maybe amend the instructions to avoid this in the future for anyone else?

The only error left deal with memcache.so

PHP Warning: PHP Startup: Unable to load dynamic library ‘memcache.so’ (tried: /usr/lib/php/20170718/memcache.so (/usr/lib/php/20170718/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20170718/memcache.so.so (/usr/lib/php/20170718/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Any suggestion how to either install the memcache module, or to eliminate this error?


#19

I will update the documentation available in the repository as soon as the WordOps stable release is published.

About your issue, just install php-memcached :

sudo apt-get install php-memcached

#20

memcached is installed, it just gives me that module error:

> php-memcached is already the newest version (3.1.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+1).

The error is :

> PHP Warning: PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20170718/memcache.so (/usr/lib/php/20170718/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20170718/memcache.so.so (/usr/lib/php/20170718/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Something is messed up, as it’s actually looking for “memcache.so.so” and while “memcache.so” is in the right location, it throws up the error: “undefined symbol: php_explicit_bzero”