Nextcloud installation claims mysql driver and php modules are missing, but they are not. Is this a php.ini problem?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing: Cant start nextcloud using

Ubuntu 20.04 apache 2.4.54 (Ubuntu) php 7.4.32
I have been trying this set of recommendations Installation on Linux — Nextcloud latest Administration Manual latest documentation to install nextcloud for days and end up with the error message (when the index.php module runs) that starts with "

No database drivers (sqlite, mysql, or postgresql) installed.
PHP module zip not installed.
Please ask your server administrator to install the module.
PHP module dom not installed.
Please ask your server administrator to install the module.
PHP module XMLWriter not installed.

however php -m | grep -i mysql yields
mysqli
mysqlnd
pdo_mysql

Showing the recommended database connector from Installation on Linux — Nextcloud latest Administration Manual latest documentation IS installed.
Similarly, although I can see the zip module through the command above my local nextcloud installation claims it is absent.
Then attempting to install php7.4 zlib yields “Unable to locate package php7.4-zlib”

My biggest challenge is trying to understand where to get these php modules from. Exactly which repo should I use ?
Then there is the question of which php version should match which nextcloud version ?
Im afraid the nextcloud manual is vacant on many of these topocs. And that is causing my hair loss as I gnash my teeth and pulll my hair…

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Install Nextcloud according to Installation on Linux — Nextcloud latest Administration Manual latest documentation

The output of your Nextcloud log in Admin > Logging:


but /var/log/apache2/errors.log shows
[php7:error] [pid 725705] [client 192.168.21.12:45914] script '/var/www/html/index.php' not found or unable to stat

And yes, there is no index.php file in the html directory but there are no instructions to do so -  so I have to assume that apache does that

Can anyone help pls ?


PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

$CONFIG = array (
‘instanceid’ => ‘ockrehnszme6’,
);

The output of your Apache/nginx/system log in /var/log/____:(no its /var/aapache2/log

PASTE HERE
 [mpm_prefork:notice] [pid 722419] AH00163: Apache/2.4.54 (Ubuntu) configured -- resuming normal operations
[core:notice] [pid 722419] AH00094: Command line: '/usr/sbin/apache2'
[php7:error] [pid 722423] [client 192.168.21.12:57686] script '/var/www/html/index.php' not found or unable to stat
[Sat Oct 15 21:53:23.479343 2022] [php7:error] [pid 722425] [client 192.168.21.12:44304] script '/var/www/html/index.php' not found or unable to stat
 [php7:error] [pid 722424] [client 192.168.21.12:47940] script '/var/www/html/index.php' not found or unable to stat
 [mpm_prefork:notice] [pid 722419] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/www/nextcloud/] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.21.12. Set the 'ServerName' directive globally to suppress this mess>
[mpm_prefork:notice] [pid 722419] AH00163: Apache/2.4.54 (Ubuntu) configured -- resuming normal operations
[core:notice] [pid 722419] AH00094: Command line: '/usr/sbin/apache2'
[php7:error] [pid 725705] [client 192.168.21.12:45914] script '/var/www/html/index.php' not found or unable to stat
[php7:error] [pid 725705] [client 192.168.21.12:45914] script '/var/www/html/index.php' not found or unable to stat
 [php7:error] [pid 725704] [client 192.168.21.12:35652] script '/var/www/html/index.php' not found or unable to stat

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

It seems that you haven’t found the search function of this forum, because otherwise you would have most likely already found an answer on this question :wink: I assume that you most likely don’t know that Nextcloud is using two different flavors of PHP, the WEB and the CLI component, which both require and individual configuration. Checking the correct configuration using “**php -m**” only proves the correct configuration of the CLI component but not the WEB component. See e.g. the phpinfo command for further information.

@j-ed I have two responses to your reply. The first is thank you and the second is a question as to whether you are admonishing me for apparently not searching the forum. Your assumption about my knowledge is exactly correct, because when do languages have separate cli libraries and web libraries. This manual PHP: PHP Manual - Manual does not speak of separate libraries even as you read the section PHP: Introduction - Manual there is no indication of the separation of libraries. Yes, if one knew that this was the case then you could read that section and the notion of 2 libraries would not be contravened. Lest this develop into an eristic conflagration may I suggest that although I am by no means a programmer, I have some experience with python so my lack of knowledge may be common to others at my level of (in) competence and perhaps that separation of cli and web libraries could be spelled out.
Irrespective of these ramblings, thank you for your response. De minimis you have helped me understand why when I flush all vestiges of my php functions from my directories, I can still see those searched by the command line.

If you have any answers about repo sources (some say stick with ubuntu sources other say use surdy)

and also about the matching of php versions to nextcloud versions (particularly with V 25.XX) that would be super
Thanks, parry

Hello Parry,
I personally cannot answer your first question because I’m not using a standard distribution.

The second question related to the supported PHP version can be answered by checking the adminstrator guide.

@j-ed Many thanks for your response