Can't run Cron Job, PHP complains about "OpenSSL" and "pdo_mysql"

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): 25.0.1
Operating system and version (eg, Ubuntu 20.04): 22.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.54-1; nginx 1.23.2-1
PHP version (eg, 7.4): 8.0 (but 8.1 is also installed)

The issue you are facing:
I am unable to run my Cron job and Nextcloud is complaining about how the job was not run in a long time. When I manually run the Cron job, I get errors about “no such directory or file” for “openssl” and “pdo_mysql”.
Errors I get from the output of php -f /home/serena/web/(domain)/public_html/cron.php:

PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php/20200930/openssl (/usr/lib/php/20200930/openssl: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/openssl.so (/usr/lib/php/20200930/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20200930/pdo_mysql (/usr/lib/php/20200930/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/pdo_mysql.so (/usr/lib/php/20200930/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20200930/pdo_pgsql (/usr/lib/php/20200930/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/pdo_pgsql.so (/usr/lib/php/20200930/pdo_pgsql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Is this the first time you’ve seen this error? (Y/N): No, the issues restarted after Oracle made fixes to their Ashburn US-East servers

Steps to replicate it:

  1. View admin overview, see error about cron jobs not running for a while
  2. Manually run cron job in ssh
  3. Got the errors posted above

The output of your Nextcloud log in Admin > Logging:

	OCA\Encryption\Exceptions\MultiKeyEncryptException: multikeyencryption failed error:0480006C:PEM routines::no start line	
2022-11-16T22:49:59-0500
OCA\Encryption\Exceptions\MultiKeyEncryptException: multikeyencryption failed error:0480006C:PEM routines::no start line	
2022-11-16T22:49:51-0500
GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to localhost port 80 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost/apps/richdocumentscode_arm64/proxy.php?req=/hosting/capabilities

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

<?php
$CONFIG = array (
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    2 => 'domain',
  ),
  'datadirectory' => '/home/serena/web/(domain)/public_html/data',
  'dbtype' => 'mysql',
  'default_phone_region' => 'US',
  'version' => '25.0.1.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'redacted',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'instanceid' => 'ocyobzixigg7',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'app_install_overwrite' => 
  array (
    0 => 'apporder',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'maintenance' => false,
);

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

PHP Warning:  PHP Startup: Unable to load dynamic library 'gmp' (tried: /usr/lib/php/20210902/gmp (/usr/lib/php/20210902/gmp: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/gmp.so (/usr/lib/php/20210920210902/gmp.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php/20210902/openssl (/usr/lib/php/20210902/openssl: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/openssl.so (/uso (/usr/lib/php/20210902/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20210902/pdo_mysql (/usr/lib/php/20210902/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/pdo_mysql_mysql.so (/usr/lib/php/20210902/pdo_mysql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20210902/pdo_pgsql (/usr/lib/php/20210902/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/pdo_pgsql_pgsql.so (/usr/lib/php/20210902/pdo_pgsql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
[Thu Nov 17 06:05:01.787277 2022] [ssl:warn] [pid 188020] AH01909: 10.0.0.40:443:0 server certificate does NOT include an ID which matches the server name
[Thu Nov 17 06:05:01.792311 2022] [mpm_prefork:notice] [pid 188020] AH00163: Apache/2.4.54 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 configured -- resuming normal operations
[Thu Nov 17 06:05:01.792341 2022] [core:notice] [pid 188020] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 17 07:13:22.033322 2022] [php:error] [pid 188077] [client 35.216.130.245:0] script '/var/www/html/info.php' not found or unable to stat
[Thu Nov 17 07:13:22.414754 2022] [access_compat:error] [pid 188079] [client 35.216.130.245:0] AH01797: client denied by server configuration: /var/www/html/server-status

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

Here is what I have in my php config, shown in my Hestia Control Panel