medalto
Posts: 6
Joined: Sun Apr 15, 2018 5:34 pm

installing /configuring drupal(9)

Sun Jul 25, 2021 9:28 am

Ive upgraded php to 7.4 and php.info tells me apache is using it .

the Drupal installation told me i needed
  • dom
    gd
    SimpleXML
    xml
apt install php7.4-gd , php7.4-xml etc gave me the required modules

the remaining requirement is
"Your web server does not appear to support any common PDO database extensions. "

its listed as a module
pi@raspberrypi:~ $ php -m | grep PDO
PDO
pi@raspberrypi:~ $
but i cant get it to be recognised
pi@raspberrypi:~ $ a2enmod php7.4-common
ERROR: Module php7.4-common does not exist!
pi@raspberrypi:~ $ sudo apt install php7.4-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.4-common is already the newest version (7.4.21-1+0~20210702.48+debian9~1.gbp9b7c1f).
The following package was automatically installed and is no longer required:
php7.0-gd
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
pi@raspberrypi:~ $ sudo apt install php7.4-pdo
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.4-common' instead of 'php7.4-pdo'
php7.4-common is already the newest version (7.4.21-1+0~20210702.48+debian9~1.gbp9b7c1f).
The following package was automatically installed and is no longer required:
php7.0-gd
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
pi@raspberrypi:~ $ sudo a2enmod php7.4-common
ERROR: Module php7.4-common does not exist!
pi@raspberrypi:~ $
Anyone know what to do next ?

medalto
Posts: 6
Joined: Sun Apr 15, 2018 5:34 pm

Re: installing /configuring drupal(9)

Sun Jul 25, 2021 10:50 am

A bit of trial and error , and comaring my ubuntu that works with drupal,

the solution is

sudo apt-get install php7.4-mysql

medalto
Posts: 6
Joined: Sun Apr 15, 2018 5:34 pm

Re: installing /configuring drupal(9)

Tue Jul 27, 2021 7:45 pm

thanks - got that bit sorted. the remaining persistent requirements is gd module
pi@raspberrypi:~ $ sudo apt-get install php7.4-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.4-gd is already the newest version (7.4.21-1+0~20210702.48+debian9~1.gbp9b7c1f).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
pi@raspberrypi:~ $ sudo a2enmod php7.4-gd
ERROR: Module php7.4-gd does not exist!
pi@raspberrypi:~ $
any suggestions ?

trejan
Posts: 3618
Joined: Tue Jul 02, 2019 2:28 pm

Re: installing /configuring drupal(9)

Tue Jul 27, 2021 8:10 pm

a2enmod enables Apache modules so doesn't know anything about PHP modules. You need to use phpenmod and the module name without the version.

medalto
Posts: 6
Joined: Sun Apr 15, 2018 5:34 pm

Re: installing /configuring drupal(9)

Tue Jul 27, 2021 9:12 pm

pi@raspberrypi:/home/pi $ php -v
PHP 7.4.21 (cli) (built: Jul 2 2021 15:33:47) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies

pi@raspberrypi:/home/pi $ sudo apt-get install php7.4-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.4-gd is already the newest version (7.4.21-1+0~20210702.48+debian9~1.gbp9b7c1f).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

pi@raspberrypi:/home/pi $ sudo phpenmod gd
WARNING: Module gd ini file doesn't exist under /etc/php/7.3/mods-available
WARNING: Module gd ini file doesn't exist under /etc/php/7.3/mods-available
pi@raspberrypi:/home/pi $

trejan
Posts: 3618
Joined: Tue Jul 02, 2019 2:28 pm

Re: installing /configuring drupal(9)

Tue Jul 27, 2021 11:06 pm

You've got PHP 7.3 and 7.4 installed. 7.4 isn't in the normal repo so you've added something.

You need to tell phpenmod which version of PHP you're trying to change e.g. "phpenmod -v 7.4 gd"

medalto
Posts: 6
Joined: Sun Apr 15, 2018 5:34 pm

Re: installing /configuring drupal(9)

Sat Jul 31, 2021 7:30 pm

thanks
I started with installing drupal 9, which requires php8.
So i installed php 8
it drupal9/php8 needs mariaDB 10.3

So I tried to upgrade from 10.1 to 10.3
And it told me 10.3 cant run on the pi .

So i then tried to roll back to drupal8 which needs php7.4

Hence the multiple copies of php that I have !

Now sorted !

Return to “Networking and servers”