PHP Fatal error - Connection.php:64 (Running OCC/cron.php)

Server configuration detail

Operating system: FreeBSD 11.2-STABLE FreeBSD 11.2-STABLE #0 r325575+5920981193f(HEAD): Mon Sep 16 23:00:13 UTC 2019 root@nemesis:/freenas-releng/freenas/_BE/objs/freenas-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64

Webserver: Apache/2.4.39 (FreeBSD) OpenSSL/1.0.2o-freebsd (fpm-fcgi)

Database: mysql 10.4.6

PHP version: 7.3.7

Modules loaded: Core, date, libxml, pcre, Reflection, SPL, hash, session, cgi-fcgi, standard, apcu, bz2, ctype, curl, dom, mbstring, fileinfo, filter, gd, mysqlnd, iconv, intl, json, ldap, exif, openssl, PDO, posix, SimpleXML, xml, xmlwriter, zip, zlib, pdo_mysql, redis, wddx, xmlreader, xsl, Zend OPcache

Nextcloud version: 16.0.6 - 16.0.6.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

<details><summary>Signing status</summary>

Array ( )

</details>

<details><summary>List of activated apps</summary>

Enabled:
 - accessibility: 1.2.0
 - activity: 2.9.1
 - bruteforcesettings: 1.4.0
 - cloud_federation_api: 0.2.0
 - comments: 1.6.0
 - dav: 1.9.2
 - federatedfilesharing: 1.6.0
 - federation: 1.6.0
 - files: 1.11.0
 - files_pdfviewer: 1.5.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.8.0
 - files_trashbin: 1.6.0
 - files_versions: 1.9.0
 - files_videoplayer: 1.5.0
 - firstrunwizard: 2.5.0
 - gallery: 18.3.0
 - logreader: 2.1.0
 - lookup_server_connector: 1.4.0
 - metadata: 0.10.0
 - nextcloud_announcements: 1.5.0
 - notifications: 2.4.1
 - oauth2: 1.4.2
 - password_policy: 1.6.0
 - privacy: 1.0.0
 - provisioning_api: 1.6.0
 - recommendations: 0.4.0
 - serverinfo: 1.6.0
 - sharebymail: 1.6.0
 - support: 1.0.0
 - survey_client: 1.4.0
 - systemtags: 1.6.0
 - text: 1.0.2
 - twofactor_backupcodes: 1.5.0
 - updatenotification: 1.6.0
 - viewer: 1.2.0
 - viewer.org: 1.0.0
 - workflowengine: 1.6.0
Disabled:
 - admin_audit
 - dropit
 - encryption
 - files_external
 - files_texteditor
 - theming
 - user_ldap



</details>

<details><summary>Configuration (config/config.php)</summary>

{
    "apps_paths": [
        {
            "path": "\/usr\/local\/www\/nextcloud\/apps",
            "url": "\/apps",
            "writable": true
        },
        {
            "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
            "url": "\/apps-pkg",
            "writable": false
        }
    ],
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.dixcartel.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "16.0.6.1",
    "overwrite.cli.url": "http:\/\/cloud.dixcartel.com",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "logtimezone": "America\/Chicago",
    "loglevel": "2",
    "logrotate_size": "104847600",
    "enabledPreviewProviders": [
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\PDF",
        "OC\\Preview\\MSOffice2003",
        "OC\\Preview\\MSOfficeDoc",
        "OC\\Preview\\PDF",
        "OC\\Preview\\Image",
        "OC\\Preview\\Photoshop",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\SVG",
        "OC\\Preview\\Font",
        "OC\\Preview\\MP3",
        "OC\\Preview\\Movie",
        "OC\\Preview\\MKV",
        "OC\\Preview\\MP4",
        "OC\\Preview\\AVI"
    ],
    "updater.secret": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "maintenance": false
}


</details>

External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36

The issue you are facing:

Receiving following error(s) when running OCC. Cron also not able to run. Time is wildly off I noticed but - I should be able to fix that I would imagine. I’ve spent the last several days reverting, copying files from back up, looking around the web etc. I see people have had similar issues but all with different solutions.

Nextcloud is up and working to some degree. Feels like an issue I may have jacked up when trying to upgrade off 7.3.7 and probably doing it wrong. Although technically back on 7.3.7 pkg and CLI currently. There has been a lot of suggestion online suggesting PHP Modules are missing, specifically like pdo_mysql (such as in my case). Though after adding and removing things, my modules list never truly changes - so I am yet once again doing that wrong as well :thinking:

root@nextcloud:/usr/local/www/nextcloud/config # php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]

root@nextcloud:/usr/local/www/nextcloud/config #support
!! OCC ERROR !!

root@nextcloud:/usr/local/www/nextcloud # sudo -u www php occ
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/local/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Objec                                                                                                    t(Doctrine\Common\EventManager))
#6 /usr/local/www/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /usr/local/www/nextcloud/lib/private/Server.php(641): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /usr/local/www/nextcloud/lib/private/Server.php(1560): OC\ServerContainer->query('DatabaseConnect...')
#14 /usr/local/www/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#18 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /usr/local/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#21 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#22 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /usr/local/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#25 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\Authenticati...')
#26 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /usr/local/www/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...')
#29 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\User\\Session')
#32 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('UserSession')
#34 /usr/local/www/nextcloud/lib/private/Server.php(1436): OC\ServerContainer->query('UserSession')
#35 /usr/local/www/nextcloud/lib/private/Server.php(694): OC\Server->getUserSession()
#36 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\App\\AppManag...')
#38 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\App\\AppManag...')
#39 /usr/local/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#40 /usr/local/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('AppManager')
#41 /usr/local/www/nextcloud/lib/private/Server.php(1731): OC\ServerContainer->query('AppManager')
#42 /usr/local/www/nextcloud/lib/private/legacy/app.php(341): OC\Server->getAppManager()
#43 /usr/local/www/nextcloud/lib/private/legacy/app.php(113): OC_App::getEnabledApps()
#44 /usr/local/www/nextcloud/lib/base.php(640): OC_App::loadApps(Array)
#45 /usr/local/www/nextcloud/lib/base.php(1056): OC::init()
#46 /usr/local/www/nextcloud/console.php(46): require_once('/usr/local/www/...')
#47 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#48 {main}PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/local/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMy in /usr/local/www/nextcloud/lib/private/DB/Connection.                                                                                                    php on line 64

!! cron.php Error !!

root@nextcloud:/usr/local/www/nextcloud/config # sudo -u www php -f /usr/local/www/nextcloud/cron.php -e
PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/local/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMy in /usr/local/www/nextcloud/lib/private/DB/Connection.php on line 64
PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/local/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMy in /usr/local/www/nextcloud/lib/private/DB/Connection.php on line 64

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

Steps to replicate it:

  1. Not 100% certain, perhaps after trying to upgrade from PHP 7.3.7 to PHP 7.3.11 via manual .tgz download & make install
  2. Running sudo -u www php /path/to/OCC | Running sudo -u www php -f /path/to/cron.php -e
  3. Be a complete n00b

The output of your Nextcloud log in Admin > Logging:

nextcloud.log

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'instanceid' => '***************',
  'passwordsalt' => '**************',
  'secret' => '*********************',
  'trusted_domains' =>
  array (
    0 => 'cloud.dixcartel.com',
  ),
  'datadirectory' => '/mnt/data',
  'dbtype' => 'mysql',
  'version' => '16.0.6.1',
  'overwrite.cli.url' => 'http://cloud.dixcartel.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '************',
  'dbpassword' => '**************',
  'installed' => true,
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'logtimezone' => 'America/Chicago',
  'loglevel' => '2',
  'logrotate_size' => '104847600',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\MarkDown',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\MSOffice2003',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\SVG',
    11 => 'OC\\Preview\\Font',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\Movie',
    14 => 'OC\\Preview\\MKV',
    15 => 'OC\\Preview\\MP4',
    16 => 'OC\\Preview\\AVI',
  ),
  'updater.secret' => '************************',
  'theme' => '',
  'maintenance' => false,
);


The output of your Apache/nginx/system log in /var/log/____:

[Thu Nov 14 01:53:54.606401 2019] [mpm_prefork:notice] [pid 22244] AH00169: caught SIGTERM, shutting down
[Thu Nov 14 01:55:51.790776 2019] [ssl:warn] [pid 4515] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 14 01:55:51.821557 2019] [http2:warn] [pid 4515] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server wi>
[Thu Nov 14 01:55:51.822481 2019] [mpm_prefork:notice] [pid 4515] AH00163: Apache/2.4.39 (FreeBSD) OpenSSL/1.0.2o-freebsd configured -- resuming normal operations
[Thu Nov 14 01:55:51.822514 2019] [core:notice] [pid 4515] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Thu Nov 14 02:11:59.585971 2019] [mpm_prefork:notice] [pid 4515] AH00169: caught SIGTERM, shutting down
[Thu Nov 14 02:11:59.664913 2019] [ssl:warn] [pid 8160] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 14 02:11:59.665429 2019] [http2:warn] [pid 8160] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server wi>
[Thu Nov 14 02:11:59.666293 2019] [mpm_prefork:notice] [pid 8160] AH00163: Apache/2.4.39 (FreeBSD) OpenSSL/1.0.2o-freebsd configured -- resuming normal operations
[Thu Nov 14 02:11:59.666326 2019] [core:notice] [pid 8160] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Thu Nov 14 02:18:50.702957 2019] [mpm_prefork:notice] [pid 8160] AH00169: caught SIGTERM, shutting down
[Thu Nov 14 02:19:06.169177 2019] [ssl:warn] [pid 9233] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 14 02:19:06.169751 2019] [http2:warn] [pid 9233] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server wi>
[Thu Nov 14 02:19:06.170685 2019] [mpm_prefork:notice] [pid 9233] AH00163: Apache/2.4.39 (FreeBSD) OpenSSL/1.0.2o-freebsd configured -- resuming normal operations
[Thu Nov 14 02:19:06.170720 2019] [core:notice] [pid 9233] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'

If your file modifications don’t have any effect on the loaded modules you are most likely editing the wrong file. I would recommend to identify the file and directory using this command:

# php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php7/cli
Loaded Configuration File => /etc/php7/cli/php.ini

Once you’ve correctly loaded the mysql php module, you can continue to solve other issues.

And this is where I likely n00bed it up pretty hard. Generally I operate strictly off packages - and really haven’t done thorough research / reading on all the different elements at play here. Although I wasn’t using nginx - I still was getting blasted with that security issue and figured I’d try and upgrade the php version anyway. That’s when it all went down hill. Unfortunately/Fortunately I tend to learn better when breaking things, and then figuring out what broke and how to fix it. Unfortunately/Fortunately I wasn’t able to resolve it myself (or in a timely enough manner) and resort to begging :frowning:

root@nextcloud:/usr/local # php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib

Clearly no php.ini loaded when stare and comparing to your example. Decided to wildcard search the location for any php oriented results.

root@nextcloud:/usr/local/lib # ls -l *php*
-rwxr-xr-x  1 root  wheel  5401837 Jul 13 20:12 libphp7.so

php:
total 107
drwxr-xr-x   3 root  wheel      7 Oct 24 21:51 .channels
-rw-r--r--   1 root  wheel   2470 Oct 24 21:51 .depdb
-rw-r--r--   1 root  wheel      0 Oct 24 21:51 .depdblock
-rw-r--r--   1 root  wheel   6961 Oct 24 21:51 .filemap
-rw-r--r--   1 root  wheel      0 Oct 24 21:51 .lock
drwxr-xr-x   5 root  wheel     10 Oct 24 21:51 .registry
drwxr-xr-x   2 root  wheel     32 Jul 20 00:21 20180731
drwxr-xr-x   2 root  wheel      3 Oct 24 21:51 Archive
drwxr-xr-x   2 root  wheel     15 Oct 24 21:51 build
drwxr-xr-x   2 root  wheel      3 Oct 24 21:51 Console
drwxr-xr-x   3 root  wheel      3 Oct 24 21:51 data
drwxr-xr-x   6 root  wheel      6 Oct 24 21:51 doc
drwxr-xr-x   3 root  wheel      3 Oct 24 21:51 extensions
drwxr-xr-x   2 root  wheel      3 Oct 24 21:51 OS
drwxr-xr-x  11 root  wheel     31 Oct 24 21:51 PEAR
-rw-r--r--   1 root  wheel  35467 Oct 24 21:51 PEAR.php
-rw-r--r--   1 root  wheel  15028 Oct 24 21:51 pearcmd.php
-rw-r--r--   1 root  wheel   1025 Oct 24 21:51 peclcmd.php
drwxr-xr-x   3 root  wheel      4 Oct 24 21:51 Structures
-rw-r--r--   1 root  wheel  20562 Oct 24 21:51 System.php
drwxr-xr-x   5 root  wheel      5 Oct 24 21:51 test
drwxr-xr-x   2 root  wheel      3 Oct 24 21:51 XML

While I was blindly shooting in the dark, I remember that dated folder being specified somewhere so I decided to check it out. There seems to be the modules, including the pdo_mysql.so

root@nextcloud:/usr/local/lib/php/20180731 # ls -l
total 3231
-rw-r--r--  1 root  wheel    78656 Jul 13 20:18 apcu.so
-rw-r--r--  1 root  wheel    21912 Jul 13 20:17 bz2.so
-rw-r--r--  1 root  wheel    12040 Jul 13 20:14 ctype.so
-rw-r--r--  1 root  wheel    93936 Jul 13 20:17 curl.so
-rw-r--r--  1 root  wheel   190792 Jul 13 20:13 dom.so
-rw-r--r--  1 root  wheel    86768 Jul 13 20:17 exif.so
-rw-r--r--  1 root  wheel  5436536 Jul 13 20:16 fileinfo.so
-rw-r--r--  1 root  wheel    45952 Jul 13 20:15 filter.so
-rw-r--r--  1 root  wheel   108032 Jul 13 20:16 gd.so
-rw-r--r--  1 root  wheel   259384 Jul 13 20:14 hash.so
-rw-r--r--  1 root  wheel    41960 Jul 13 20:15 iconv.so
-rw-r--r--  1 root  wheel   460712 Jul 13 20:17 intl.so
-rw-r--r--  1 root  wheel    44920 Jul 13 20:14 json.so
-rw-r--r--  1 root  wheel    84056 Jul 13 20:15 ldap.so
-rw-r--r--  1 root  wheel  1078704 Jul 13 20:15 mbstring.so
-rw-r--r--  1 root  wheel   535808 Jul 13 20:18 opcache.so
-rw-r--r--  1 root  wheel   185080 Jul 13 20:15 openssl.so
-rw-r--r--  1 root  wheel    26024 Jul 13 20:17 pdo_mysql.so
-rw-r--r--  1 root  wheel   107048 Jul 13 20:15 pdo.so
-rw-r--r--  1 root  wheel    34784 Jul 13 20:16 posix.so
-rw-r--r--  1 root  wheel   514784 Jul 13 20:31 redis.so
-rw-r--r--  1 root  wheel    95392 Jul 13 20:14 session.so
-rw-r--r--  1 root  wheel    59136 Jul 13 20:18 simplexml.so
-rw-r--r--  1 root  wheel    30296 Jul 13 20:17 wddx.so
-rw-r--r--  1 root  wheel    52760 Jul 13 20:13 xml.so
-rw-r--r--  1 root  wheel    34336 Jul 13 20:17 xmlreader.so
-rw-r--r--  1 root  wheel    46328 Jul 13 20:17 xmlwriter.so
-rw-r--r--  1 root  wheel    33672 Jul 17 22:05 xsl.so
-rw-r--r--  1 root  wheel    62312 Jul 13 20:16 zip.so
-rw-r--r--  1 root  wheel    48256 Jul 13 20:13 zlib.so

I recall seeing that folder being defined at this location / php.conf:

root@nextcloud:/usr/local/etc # ls -l php.conf
-rw-r--r--  1 root  wheel  99 Oct 24 22:15 php.conf

  GNU nano 4.2                                                                                                                                              php.conf
PHP_VER=73
PHP_VERSION=7.3.11
PHP_SAPI=cli cgi fpm embed
PHP_EXT_INC=pcre spl
PHP_EXT_DIR=20180731

Which, I feel all of that is all over the place - once again likely due to my lack of experience. So I do apologize for that but I do appreciate your guidance along the way. If I don’t hear anything back in the next couple days or so I can definitely WANT to and can look further into how to resolve this - just tonight won’t allow me the time to do so.

Thanks once again.

Decided to pkg delete php73-7.3.7 (due to being custom install and not pkg repo):

Installed packages to be REMOVED:
        php73-7.3.7
        php73-pecl-redis-4.2.0
        nextcloud-php73-16.0.3
        php73-bz2-7.3.7
        php73-zip-7.3.7
        php73-zlib-7.3.7
        php73-iconv-7.3.7
        php73-mbstring-7.3.7
        php73-pdo_mysql-7.3.7
        php73-pecl-APCu-5.1.17
        php73-intl-7.3.7
        php73-json-7.3.7
        php73-curl-7.3.7
        php73-exif-7.3.7
        php73-gd-7.3.7
        php73-ldap-7.3.7
        php73-filter-7.3.7
        php73-hash-7.3.7
        php73-openssl-7.3.7
        php73-fileinfo-7.3.7
        php73-posix-7.3.7
        php73-ctype-7.3.7
        php73-simplexml-7.3.7
        php73-wddx-7.3.7
        php73-xmlreader-7.3.7
        php73-xmlwriter-7.3.7
        php73-xsl-7.3.7
        php73-opcache-7.3.7
        php73-pdo-7.3.7
        php73-dom-7.3.7
        php73-xml-7.3.7
        php73-session-7.3.7

Number of packages to be removed: 32

Visited /var/cache/pkg and pkg add php73-7.3.7.txz and nextcloud-php73-16.0.3.txz also making sure all the prior packages reinstalled.

root@nextcloud:/var/cache/pkg # php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
root@nextcloud:/var/cache/pkg # php -m
[PHP Modules]
apcu
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
hash
iconv
intl
json
ldap
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_mysql
posix
redis
Reflection
session
SimpleXML
SPL
standard
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

There was a conflict with nextcloud-php73-16.0.3.txz so I went ahead and pkg install nextcloud-php73-17.0.0. When attempting to upgrade via OCC I began receiving errors about “viewer” not having the proper files updated. I went ahead and changed nextcloud/apps to apps.bak and created a new apps folder and set permissions to chown -R www:www apps

This allowed me to run the OCC upgrade. After turning maintenance mode off, I ran the Web Browser and continued the upgrade. Web Gui is functional but seeing a call for app updates to 17.0.1 though when attempting via Web Gui I error out with a message about “apps.old”. I moved the apps.old folder out of the nextcloud directory I’m prompted to update again via the Web Gui. Moved on but received following errors:

Following apps have been disabled: bruteforcesettings (incompatible), metadata (incompatible)

Also seems the permissions and download location of the updater files are all out of whack. So I cp -R from the /mnt/data/updater-ocu3lnbvvkny/downloads/nextcloud/ updater folder to the nextcloud directory and set chown -R www:www to the nextcloud directory and ran the updater again from the web gui.

As it stands, all my checks pass. That was probably REALLY sloppy work there but… seemed to get me updated. I’m still on php73-7.3.7 and curious if I should upgrade from there but right now I think I’m just going to take a snapshot and call it a success for the night :slight_smile:

Server configuration detail

Operating system: FreeBSD 11.2-STABLE FreeBSD 11.2-STABLE #0 r325575+5920981193f(HEAD): Mon Sep 16 23:00:13 UTC 2019 root@nemesis:/freenas-releng/freenas/_BE/objs/freenas-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64

Webserver: Apache/2.4.39 (FreeBSD) OpenSSL/1.0.2o-freebsd (fpm-fcgi)

Database: mysql 10.4.6

PHP version: 7.3.7

Modules loaded: Core, date, libxml, pcre, Reflection, SPL, hash, session, cgi-fcgi, standard, apcu, bz2, ctype, curl, dom, mbstring, fileinfo, filter, gd, mysqlnd, iconv, intl, json, ldap, exif, openssl, PDO, posix, SimpleXML, xml, xmlwriter, zip, zlib, pdo_mysql, redis, wddx, xmlreader, xsl, Zend OPcache

Nextcloud version: 17.0.1 - 17.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

<details><summary>Signing status</summary>

Array ( )

</details>

<details><summary>List of activated apps</summary>

Enabled:
 - accessibility: 1.3.0
 - activity: 2.10.1
 - bruteforcesettings: 1.4.0
 - cloud_federation_api: 1.0.0
 - comments: 1.7.0
 - dav: 1.13.0
 - federatedfilesharing: 1.7.0
 - federation: 1.7.0
 - files: 1.12.0
 - files_pdfviewer: 1.6.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.9.0
 - files_trashbin: 1.7.0
 - files_versions: 1.10.0
 - files_videoplayer: 1.6.0
 - firstrunwizard: 2.6.0
 - gallery: 18.4.0
 - logreader: 2.2.0
 - lookup_server_connector: 1.5.0
 - metadata: 0.10.0
 - nextcloud_announcements: 1.6.0
 - notifications: 2.5.0
 - oauth2: 1.5.0
 - password_policy: 1.7.0
 - privacy: 1.1.0
 - provisioning_api: 1.7.0
 - recommendations: 0.5.0
 - serverinfo: 1.7.0
 - sharebymail: 1.7.0
 - support: 1.0.1
 - survey_client: 1.5.0
 - systemtags: 1.7.0
 - text: 1.1.1
 - twofactor_backupcodes: 1.6.0
 - updatenotification: 1.7.0
 - viewer: 1.2.0
 - workflowengine: 1.7.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - theming
 - user_ldap
 - viewer.org



</details>

<details><summary>Configuration (config/config.php)</summary>

{
    "apps_paths": [
        {
            "path": "\/usr\/local\/www\/nextcloud\/apps",
            "url": "\/apps",
            "writable": true
        },
        {
            "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
            "url": "\/apps-pkg",
            "writable": false
        }
    ],
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.dixcartel.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "17.0.1.1",
    "overwrite.cli.url": "http:\/\/cloud.dixcartel.com",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "logtimezone": "America\/Chicago",
    "loglevel": "2",
    "logrotate_size": "104847600",
    "enabledPreviewProviders": [
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\PDF",
        "OC\\Preview\\MSOffice2003",
        "OC\\Preview\\MSOfficeDoc",
        "OC\\Preview\\PDF",
        "OC\\Preview\\Image",
        "OC\\Preview\\Photoshop",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\SVG",
        "OC\\Preview\\Font",
        "OC\\Preview\\MP3",
        "OC\\Preview\\Movie",
        "OC\\Preview\\MKV",
        "OC\\Preview\\MP4",
        "OC\\Preview\\AVI"
    ],
    "updater.secret": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "maintenance": false
}


</details>

External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36

I’ll have to see if it can withstand a jail reboot as well - I’ve noticed after doing work like this at times php-fpm or some other service will fail to start up and throw some wild error.

Super that you managed to get it updated. BTW, the mentioned apps are available for Nextcloud 17 :wink:
If everything is running fine now please mark this request as “solved”.