Code:
$ sudo apt-get -y install php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext
I ran this command for PHP 7 and it fixed the PDO drivers, I got the error reported back 'no driver found' -- that was my issue -- actually I found this code snippet when searching PDO fixes specifically -- it came from a supplementary command on a Digital Ocean tutorial.
php7.0-mysql was the fix, the rest looked useful to me so I installed them: gd, pear, imagemagic and sqlite3. I have needed to use these in the past and they were not installed. My HTTP server is Nginx and PHP will work out of the box with a tweak to the gateway
For reference: Fix Nginx PHP gateway -- if anyone else is struggling with this ...
Code:
location ~ \.php {
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:[port number];
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
}
Code:
root@localhost:/etc/php/7.0/fpm/pool.d# egrep 'listen' www.conf
; - 'listen' (unixsocket)
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
; 'port' - to listen on a TCP socket to all addresses
; '/path/to/unix/socket' - to listen on a unix socket.
change>>>>listen = /run/php/php7.0-fpm.sock
to>>> listen = 127.0.0.1:[same port number used in your Nginx configuration files]
^^^^^
; Set listen(2) backlog.
;listen.backlog = 511
service php7.0-fpm restart