After upgrading from 27.1 to v 28.1.2, I ran into this issue below.
[dougs@nextcloud 16.Oct 5:34pm # occ maintenance:update:htaccess
PHP Warning: PHP Startup: Unable to load dynamic library 'ldap' (tried: /usr/local/lib/php/20210902/ldap (Cannot open "/usr/local/lib/php/20210902/ldap"), /usr/local/lib/php/20210902/ldap.so (Shared object "libldap_r-2.4.so.2" not found, required by "ldap.so")) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'ldap.so' (tried: /usr/local/lib/php/20210902/ldap.so (Shared object "libldap_r-2.4.so.2" not found, required by "ldap.so"), /usr/local/lib/php/20210902/ldap.so.so (Cannot open "/usr/local/lib/php/20210902/ldap.so.so")) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'smbclient.so' (tried: /usr/local/lib/php/20210902/smbclient.so (Shared object "libldap_r-2.4.so.2" not found, required by "libsmbconf.so.0"), /usr/local/lib/php/20210902/smbclient.so.so (Cannot open "/usr/local/lib/php/20210902/smbclient.so.so")) in Unknown on line 0
Error updating .htaccess file, not enough permissions or "overwrite.cli.url" set to an invalid URL?
[dougs@nextcloud 16.Oct 5:35pm #
This is on FreeBSD 13.2-RELEASE-p4 machine. php81-ldap is also installed.
All the files referenced in the error message above appear to be where they should be.
[dougs@nextcloud 16.Oct 5:35pm # ll /usr/local/lib/php/20210902/
total 3524
-rw-r--r-- 1 root wheel 82000 Dec 28 2022 apcu.so
-rw-r--r-- 1 root wheel 41024 Oct 2 16:05 bcmath.so
-rw-r--r-- 1 root wheel 23632 Oct 2 16:05 bz2.so
-rw-r--r-- 1 root wheel 11928 Oct 2 16:05 ctype.so
-rw-r--r-- 1 root wheel 107472 Oct 2 16:05 curl.so
-rw-r--r-- 1 root wheel 204192 Oct 2 16:05 dom.so
-rw-r--r-- 1 root wheel 90992 Oct 2 16:05 exif.so
-rw-r--r-- 1 root wheel 7156864 Oct 2 16:06 fileinfo.so
-rw-r--r-- 1 root wheel 48088 Oct 2 16:06 filter.so
-rw-r--r-- 1 root wheel 111792 Oct 2 16:06 gd.so
-rw-r--r-- 1 root wheel 66008 Oct 2 16:06 gmp.so
-rw-r--r-- 1 root wheel 41448 Oct 2 16:06 iconv.so
-rw-r--r-- 1 root wheel 448888 Jul 22 18:51 imagick.so
-rw-r--r-- 1 root wheel 476024 Oct 2 16:07 intl.so
-rw-r--r-- 1 root wheel 92152 Oct 2 16:07 ldap.so
-rw-r--r-- 1 root wheel 1092520 Oct 2 16:08 mbstring.so
-rw-r--r-- 1 root wheel 1006520 Oct 2 16:08 opcache.so
-rw-r--r-- 1 root wheel 36536 Oct 2 16:08 pcntl.so
-rw-r--r-- 1 root wheel 112528 Oct 2 16:08 pdo.so
-rw-r--r-- 1 root wheel 45904 Oct 2 16:09 pdo_pgsql.so
-rw-r--r-- 1 root wheel 135232 Oct 2 16:09 pgsql.so
-rw-r--r-- 1 root wheel 35144 Oct 2 16:09 posix.so
-rw-r--r-- 1 root wheel 98232 Oct 2 16:09 session.so
-rw-r--r-- 1 root wheel 53824 Oct 2 16:09 simplexml.so
-rw-r--r-- 1 root wheel 67872 Apr 28 17:11 smbclient.so
-rw-r--r-- 1 root wheel 11608 Oct 2 16:09 sysvsem.so
-rw-r--r-- 1 root wheel 50432 Oct 2 16:09 xml.so
-rw-r--r-- 1 root wheel 38136 Oct 2 16:09 xmlreader.so
-rw-r--r-- 1 root wheel 48840 Oct 2 16:09 xmlwriter.so
-rw-r--r-- 1 root wheel 32864 Oct 2 16:10 xsl.so
-rw-r--r-- 1 root wheel 76496 Oct 2 16:10 zip.so
-rw-r--r-- 1 root wheel 50944 Oct 2 16:10 zlib.so
[dougs@nextcloud 16.Oct 5:39pm # locate libldap
/usr/local/lib/libldap-2.4.so.2
/usr/local/lib/libldap-2.4.so.2.11.7
/usr/local/lib/libldap.a
/usr/local/lib/libldap.la
/usr/local/lib/libldap.so
/usr/local/lib/libldap_r-2.4.so.2
/usr/local/lib/libldap_r-2.4.so.2.11.7
/usr/local/lib/libldap_r.a
/usr/local/lib/libldap_r.la
/usr/local/lib/libldap_r.so
/usr/ports/net/openldap25-server/files/patch-libraries__libldap__Makefile.in
/usr/ports/net/openldap25-server/files/patch-libraries_libldap_tls__o.c
/usr/ports/net/openldap26-server/files/patch-libraries__libldap__Makefile.in
/usr/ports/net/openldap26-server/files/patch-libraries_libldap_tls__o.c
[dougs@nextcloud 16.Oct 5:39pm /usr/home/dougs]#
I find it odd that the error message goes on to state that it cannot open “/usr/local/lib/php/20210902/ldap.so.so”. Please note ‘so’ being duplicated here.
Nextcloud version (eg, 20.0.5): 27.1.2
Operating system and version (eg, Ubuntu 20.04): FreeBSD 13.2-RELEASE-p4
Apache or nginx version (eg, Apache 2.4.25): 2.4.57_1
PHP version (eg, 7.4): replace me
Is this the first time you’ve seen this error? (Y/N): Y
The output of your config.php file in /usr/local/www/nextcloud
:
$CONFIG = array (
'apps_paths' =>
array (
array (
'path' => '/usr/local/www/nextcloud/apps',
'url' => '/apps',
'writable' => true,
array (
'path' => '/usr/local/www/nextcloud/apps-pkg',
'url' => '/apps-pkg',
'writable' => false,
'logfile' => '/var/log/nextcloud/nextcloud.log',
'memcache.local' => '\\OC\\Memcache\\APCu',
'instanceid' => 'redacted',
'passwordsalt' => 'redacted',
'secret' => 'redacted',
'trusted_domains' =>
array (
0 => 'nextcloud.example.com',
'datadirectory' => '/usr/local/www/nextcloud/data',
'dbtype' => 'pgsql',
'version' => '27.1.2.1',
'overwrite.cli.url' => 'http://nextcloud.example.com/nextcloud',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:5432',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud_user',
'dbpassword' => '',
'installed' => true,
'theme' => '',
'loglevel' => 2,
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'mail.example.com',
'mail_sendmailmode' => 'smtp',
'mail_smtpport' => '25',
'mail_from_address' => 'nextcloud',
'mail_domain' => 'example.com',
This division of apps into read-only and read/writable indicates an apliance installation.
Could it be, that your installation is Docker or AIO, which would make your problem partial explainable?
Much luck,
ernolf