I was trying to install a custom module from the command line using drush and I ran into this error on a Drupal 9.2.1 site on a windows machine with XAMPP. The module installed fine but when I tried to access the settings form for the module, I get a WSOD and I see the following error in dblog.

InvalidArgumentException: Class "\Drupal\module_name\Form\SettingsForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of site.com\web\core\lib\Drupal\Core\DependencyInjection\ClassResolver.php).

This does not happen when you enable the module from the Drupal Admin interface. This also does not happen when you run drush cr after the module install.

I tried to see if this had something to do with how the module was written and tried to recreate the error with a contrib module. I tried with something that was already installed viz. clamav. Disabled the module and enabled it using drush and went to access the settings form and I got the white screen and the same error in dblog - InvalidArgumentException: Class "Drupal\clamav\Form\ClamAVConfigForm" does not exist.

I tried to recreate this on an Ubuntu machine (Apache) with the same custom module and clamav but was not able to recreate this.

Comments

anoopjohn created an issue. See original summary.

cilefen’s picture

Component: install system » extension system
Issue tags: +Bug Smash Initiative

How are you executing Drush and what version is it?

If you restart the web server after installing the module with Drush then try the form, what happens?

larowlan’s picture

Are you using a global drush or running it from vendor

anoopjohn’s picture

I am running Drush from git bash from Mingw64. It is the global drush and version 10.5.0.

I restarted Apache after drush pm-enable and ran into the same error

cilefen’s picture

Something to consider, via https://www.drush.org/latest/install/:

Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency.

larowlan’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Yeah, from drush 10, it needs to be installed with composer from the same autoloader as core

anoopjohn’s picture

Status: Closed (works as designed) » Active

Thanks for looking into this.

I uninstalled global drush and ran it from the vendor/bin folder. I get the same error when I don't run drush cr after drush pm-enable clamav.

drush was already part of composer.json as a dependency and was present in vendor folder

./vendor/bin/drush status
 Drupal version   : 9.2.2
 Site URI         : http://default
 DB driver        : mysql
 DB hostname      : localhost
 DB port          : 3306
 DB username      : dbuser
 DB name          : dbname
 Database         : Connected
 Drupal bootstrap : Successful
 Default theme    : default_theme
 Admin theme      : seven
 PHP binary       : C:\xampp\php\php.exe
 PHP config       : C:\xampp\php\php.ini
 PHP OS           : WINNT
 Drush script     : C:\xampp\apps\sitename\vendor\bin\drush
 Drush version    : 10.5.0
 Drush temp       : C:\Users\user\AppData\Local\Temp
 Drush configs    : C:/xampp/apps/sitename/vendor/drush/drush/drush.yml
                    C:/xampp/apps/sitename/drush/drush.yml
 Install profile  : my_profile
 Drupal root      : C:\xampp\apps\sitename/web
 Site path        : sites/default
 Files, Public    : sites/default/files
 Files, Private   : sites/default/files/private/
 Files, Temp      : \xampp\tmp
cilefen’s picture

I am not sure where to go from here. We’ll need complete steps to reproduce.

Do you know of another XAMPP user that could try to reproduce it?

anoopjohn’s picture

Conceptually why would it fail? What is it that the module install does not do that causes this class to not be autoloaded which happens after a drush cr?

I can add debug statements and collect more information but would help to know where to start / add them.

cilefen’s picture

Since it’s platform-specific I would scrutinize phpinfo differences.

tgoeg’s picture

I don't think this is platform specific.
I have exactly the same problem with *some* modules.
Using global drush or the one from vendor/bin does not make a difference.
It just happened with file_extractor. Installed it with

composer require "drupal/file_extractor:<3" # I'm on latest 8.9.x
drush -l <site> pm:en file_extractor

Visited https://site/admin/config/media/file-extractor and got the mentioned error.
drush -l <site> cr
fixes it.
This is on a LAMP stack (Debian 9, PHP 7.2, mariaDB 10.1.48)

Any more debug info I can provide?

tgoeg’s picture

Strangely, the same config import on a different server that's basically set up the same but runs on Ubuntu 18.04, PHP 7.2, mySQL 5.7.35 does not have this problem, no cache rebuild needed after config import, no error. This corresponds to anoopjohn's try to reproduce it on Ubuntu which also turned out not to show this error.

@anoopjohn: Does your XAMPP stack use mySQL or mariaDB?

anoopjohn’s picture

@tgoeg - I have MariaDB

cilefen’s picture

More debug? See comment #10.

cilefen’s picture

Is opcache enabled on the CLI?

tgoeg’s picture

Here is the diff of the two phpinfo()s when run as "php -r "phpinfo();"" from the CLI.

The only thing of notable difference seems to be redis support.

I am unsure however which php.ini gets used on the CLI anyway.
There's /etc/php/7.2/cli/php.ini which seems to get used when running the mentioned command, and there is /etc/php/7.2/apache2/php.ini which *does* use "opcache.enable_cli=1" and which definitely has an effect on the occ CLI command used by nextcloud (though I'd expect it to use /etc/php/7.2/cli/php.ini which it clearly does not).

Is opcache on the CLI supposed to work or produce problems?

--- /mnt/scratch/debian_not_working.txt	2021-10-07 09:40:04.720622868 +0200
+++ /mnt/scratch/ubuntu_working.txt	2021-10-07 09:20:06.930530675 +0200
@@ -1,8 +1,8 @@
 phpinfo()
-PHP Version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
+PHP Version => 7.2.24-0ubuntu0.18.04.8
 
-System => Linux goegsweb10 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64
-Build Date => Aug  7 2020 14:55:55
+System => Linux goegsweb08 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64
+Build Date => Jul  5 2021 17:41:32
 Server API => Command Line Interface
 Virtual Directory Support => disabled
 Configuration File (php.ini) Path => /etc/php/7.2/cli
@@ -26,6 +26,7 @@
 /etc/php/7.2/cli/conf.d/20-gettext.ini,
 /etc/php/7.2/cli/conf.d/20-gmp.ini,
 /etc/php/7.2/cli/conf.d/20-iconv.ini,
+/etc/php/7.2/cli/conf.d/20-igbinary.ini,
 /etc/php/7.2/cli/conf.d/20-imagick.ini,
 /etc/php/7.2/cli/conf.d/20-intl.ini,
 /etc/php/7.2/cli/conf.d/20-json.ini,
@@ -33,14 +34,14 @@
 /etc/php/7.2/cli/conf.d/20-mbstring.ini,
 /etc/php/7.2/cli/conf.d/20-mysqli.ini,
 /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini,
-/etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini,
 /etc/php/7.2/cli/conf.d/20-phar.ini,
 /etc/php/7.2/cli/conf.d/20-posix.ini,
 /etc/php/7.2/cli/conf.d/20-readline.ini,
+/etc/php/7.2/cli/conf.d/20-redis.ini,
 /etc/php/7.2/cli/conf.d/20-shmop.ini,
 /etc/php/7.2/cli/conf.d/20-simplexml.ini,
 /etc/php/7.2/cli/conf.d/20-sockets.ini,
-/etc/php/7.2/cli/conf.d/20-sqlite3.ini,
+/etc/php/7.2/cli/conf.d/20-ssh2.ini,
 /etc/php/7.2/cli/conf.d/20-sysvmsg.ini,
 /etc/php/7.2/cli/conf.d/20-sysvsem.ini,
 /etc/php/7.2/cli/conf.d/20-sysvshm.ini,
@@ -64,13 +65,13 @@
 IPv6 Support => enabled
 DTrace Support => available, disabled
 
-Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
+Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp, zip
 Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
 Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*
 
 This program makes use of the Zend Scripting Language Engine:
 Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
-    with Zend OPcache v7.2.33-1+0~20200807.47+debian9~1.gbpcb3068, Copyright (c) 1999-2018, by Zend Technologies
+    with Zend OPcache v7.2.24-0ubuntu0.18.04.8, Copyright (c) 1999-2018, by Zend Technologies
 
 
  _______________________________________________________________________
@@ -81,12 +82,12 @@
 apcu
 
 APCu Support => Disabled
-Version => 5.1.18
+Version => 5.1.9
 APCu Debugging => Disabled
 MMAP Support => Enabled
 MMAP File Mask =>  
 Serialization Support => Disabled
-Build Date => May 18 2020 08:15:57
+Build Date => Feb  2 2018 03:51:25
 
 Directive => Local Value => Master Value
 apc.coredump_unmap => Off => Off
@@ -99,10 +100,11 @@
 apc.serializer => php => php
 apc.shm_segments => 1 => 1
 apc.shm_size => 32M => 32M
-apc.slam_defense => Off => Off
+apc.slam_defense => On => On
 apc.smart => 0 => 0
 apc.ttl => 0 => 0
 apc.use_request_time => On => On
+apc.writable => /tmp => /tmp
 
 bcmath
 
@@ -124,7 +126,7 @@
 
 Core
 
-PHP Version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
+PHP Version => 7.2.24-0ubuntu0.18.04.8
 
 Directive => Local Value => Master Value
 allow_url_fopen => On => On
@@ -221,8 +223,8 @@
 curl
 
 cURL support => enabled
-cURL Information => 7.52.1
-Age => 3
+cURL Information => 7.58.0
+Age => 4
 Features
 AsynchDNS => Yes
 CharConv => No
@@ -244,11 +246,10 @@
 KERBEROS5 => Yes
 UNIX_SOCKETS => Yes
 PSL => Yes
-Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
+Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, smb, smbs, smtp, smtps, telnet, tftp
 Host => x86_64-pc-linux-gnu
-SSL Version => OpenSSL/1.0.2u
-ZLib Version => 1.2.8
-libSSH Version => libssh2/1.7.0
+SSL Version => OpenSSL/1.1.1
+ZLib Version => 1.2.11
 
 date
 
@@ -269,7 +270,7 @@
 
 DOM/XML => enabled
 DOM/XML API Version => 20031129
-libxml Version => 2.9.9
+libxml Version => 2.9.4
 HTML Support => enabled
 XPath Support => enabled
 XPointer Support => enabled
@@ -279,7 +280,7 @@
 exif
 
 EXIF Support => enabled
-EXIF Version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
+EXIF Version => 7.2.24-0ubuntu0.18.04.8
 Supported EXIF Version => 0220
 Supported filetypes => JPEG, TIFF
 Multibyte decoding support using mbstring => enabled
@@ -320,13 +321,13 @@
 GD library Version => 2.2.5
 FreeType Support => enabled
 FreeType Linkage => with freetype
-FreeType Version => 2.6.3
+FreeType Version => 2.8.1
 GIF Read Support => enabled
 GIF Create Support => enabled
 JPEG Support => enabled
-libJPEG Version => 6b
+libJPEG Version => 8
 PNG Support => enabled
-libPNG Version => 1.6.28
+libPNG Version => 1.6.34
 WBMP Support => enabled
 XPM Support => enabled
 libXpm Version => 30411
@@ -357,24 +358,34 @@
 
 iconv support => enabled
 iconv implementation => glibc
-iconv library version => 2.24
+iconv library version => 2.27
 
 Directive => Local Value => Master Value
 iconv.input_encoding => no value => no value
 iconv.internal_encoding => no value => no value
 iconv.output_encoding => no value => no value
 
+igbinary
+
+igbinary support => enabled
+igbinary version => 2.0.5
+igbinary APCU serializer ABI => 0
+igbinary session support => yes
+
+Directive => Local Value => Master Value
+igbinary.compact_strings => On => On
+
 imagick
 
 imagick module => enabled
-imagick module version => 3.4.4
+imagick module version => 3.4.3RC2
 imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
 Imagick compiled with ImageMagick version => ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
 Imagick using ImageMagick library version => ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
 ImageMagick copyright => © 1999-2017 ImageMagick Studio LLC
 ImageMagick release date => 20170114
-ImageMagick number of supported formats:  => 236
-ImageMagick supported formats => 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
+ImageMagick number of supported formats:  => 230
+ImageMagick supported formats => 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
 
 Directive => Local Value => Master Value
 imagick.locale_fix => 0 => 0
@@ -385,10 +396,10 @@
 
 Internationalization support => enabled
 version => 1.1.0
-ICU version => 65.1
-ICU Data version => 65.1
-ICU TZData version => 2019c
-ICU Unicode version => 12.1
+ICU version => 60.2
+ICU Data version => 60.2
+ICU TZData version => 2017c
+ICU Unicode version => 10.0
 
 Directive => Local Value => Master Value
 intl.default_locale => no value => no value
@@ -407,7 +418,7 @@
 Total Links => 0/unlimited
 API Version => 3001
 Vendor Name => OpenLDAP
-Vendor Version => 20444
+Vendor Version => 20445
 SASL Support => Enabled
 
 Directive => Local Value => Master Value
@@ -416,8 +427,8 @@
 libxml
 
 libXML support => active
-libXML Compiled Version => 2.9.9
-libXML Loaded Version => 20909
+libXML Compiled Version => 2.9.4
+libXML Loaded Version => 20904
 libXML streams => enabled
 
 mbstring
@@ -651,8 +662,8 @@
 openssl
 
 OpenSSL support => enabled
-OpenSSL Library Version => OpenSSL 1.1.1g  21 Apr 2020
-OpenSSL Header Version => OpenSSL 1.1.1g  21 Apr 2020
+OpenSSL Library Version => OpenSSL 1.1.1  11 Sep 2018
+OpenSSL Header Version => OpenSSL 1.1.1  11 Sep 2018
 Openssl default config => /usr/lib/ssl/openssl.cnf
 
 Directive => Local Value => Master Value
@@ -666,7 +677,7 @@
 pcre
 
 PCRE (Perl Compatible Regular Expressions) Support => enabled
-PCRE Library Version => 8.43 2019-02-23
+PCRE Library Version => 8.39 2016-06-14
 PCRE JIT Support => enabled
 
 Directive => Local Value => Master Value
@@ -677,7 +688,7 @@
 PDO
 
 PDO support => enabled
-PDO drivers => mysql, sqlite
+PDO drivers => mysql
 
 pdo_mysql
 
@@ -687,17 +698,12 @@
 Directive => Local Value => Master Value
 pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock
 
-pdo_sqlite
-
-PDO Driver for SQLite 3.x => enabled
-SQLite Library => 3.16.2
-
 Phar
 
 Phar: PHP Archive support => enabled
 Phar EXT version => 2.0.2
 Phar API version => 1.1.1
-SVN revision => $Id: ba76a9b0e06d536a9b602c782e38e6826cb4ee02 $
+SVN revision => $Id: f1155e62742ca367e521a3e412667d8ee34eead9 $
 Phar-based phar archives => enabled
 Tar-based phar archives => enabled
 ZIP-based phar archives => enabled
@@ -727,16 +733,22 @@
 cli.pager => no value => no value
 cli.prompt => \b \>  => \b \> 
 
+redis
+
+Redis Support => enabled
+Redis Version => 3.1.6
+Available serializers => php, igbinary
+
 Reflection
 
 Reflection => enabled
-Version => $Id: fe5f2178c6eb97631d3f8f03ceb9eddb88e664c7 $
+Version => $Id: 012f23982d9d94728b4da252b9f21f9de8afd4df $
 
 session
 
 Session Support => enabled
-Registered save handlers => files user 
-Registered serializer handlers => php_serialize php php_binary wddx 
+Registered save handlers => files user redis rediscluster 
+Registered serializer handlers => php_serialize php php_binary igbinary wddx 
 
 Directive => Local Value => Master Value
 session.auto_start => Off => Off
@@ -786,8 +798,8 @@
 sodium
 
 sodium support => enabled
-libsodium headers version => 1.0.18
-libsodium library version => 1.0.18
+libsodium headers version => 1.0.16
+libsodium library version => 1.0.16
 
 SPL
 
@@ -795,14 +807,12 @@
 Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
 Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
 
-sqlite3
-
-SQLite3 support => enabled
-SQLite3 module version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
-SQLite Library => 3.16.2
+ssh2
 
-Directive => Local Value => Master Value
-sqlite3.extension_dir => no value => no value
+SSH2 support => enabled
+extension version => 1.1.2
+libssh2 version => 1.8.0
+banner => SSH-2.0-libssh2_1.8.0
 
 standard
 
@@ -832,11 +842,11 @@
 
 sysvsem
 
-Version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
+Version => 7.2.24-0ubuntu0.18.04.8
 
 sysvshm
 
-Version => 7.2.33-1+0~20200807.47+debian9~1.gbpcb3068
+Version => 7.2.24-0ubuntu0.18.04.8
 
 tokenizer
 
@@ -851,7 +861,7 @@
 
 XML Support => active
 XML Namespace Support => active
-libxml2 Version => 2.9.9
+libxml2 Version => 2.9.4
 
 xmlreader
 
@@ -916,16 +926,15 @@
 
 Zip => enabled
 Zip version => 1.15.4
-Libzip headers version => 1.5.1
-Libzip library version => 1.5.1
+Libzip version => 1.1.2
 
 zlib
 
 ZLib Support => enabled
 Stream Wrapper => compress.zlib://
 Stream Filter => zlib.inflate, zlib.deflate
-Compiled Version => 1.2.8
-Linked Version => 1.2.8
+Compiled Version => 1.2.11
+Linked Version => 1.2.11
 
 Directive => Local Value => Master Value
 zlib.output_compression => Off => Off
@@ -939,51 +948,41 @@
 Environment
 
 Variable => Value
-LC_PAPER => de_AT.UTF-8
 LANG => en_US.UTF-8
 USER => drupal
 PWD => /var/www/drupal
 HOME => /var/www/drupal
-LC_NUMERIC => de_AT.utf8
-SSH_TTY => /dev/pts/0
 MAIL => /var/mail/drupal
 SHELL => /bin/bash
 TERM => xterm-256color
 SHLVL => 1
 LANGUAGE => en_US:en
 LOGNAME => drupal
-PATH => /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:~/bin
-LC_TIME => de_AT.utf8
+PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/bin
 _ => /usr/bin/php
 
 PHP Variables
 
 Variable => Value
-$_SERVER['SSH_CONNECTION'] => 172.30.176.230 34540 10.251.12.74 22
-$_SERVER['LC_PAPER'] => de_AT.UTF-8
 $_SERVER['LANG'] => en_US.UTF-8
 $_SERVER['USER'] => drupal
 $_SERVER['PWD'] => /var/www/drupal
 $_SERVER['HOME'] => /var/www/drupal
-$_SERVER['SSH_CLIENT'] => 172.30.176.230 34540 22
-$_SERVER['LC_NUMERIC'] => de_AT.utf8
-$_SERVER['SSH_TTY'] => /dev/pts/0
 $_SERVER['MAIL'] => /var/mail/drupal
-$_SERVER['TERM'] => xterm-256color
 $_SERVER['SHELL'] => /bin/bash
+$_SERVER['TERM'] => xterm-256color
 $_SERVER['SHLVL'] => 1
 $_SERVER['LANGUAGE'] => en_US:en
 $_SERVER['LOGNAME'] => drupal
-$_SERVER['PATH'] => /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:~/bin
-$_SERVER['LC_TIME'] => de_AT.utf8
+$_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/bin
 $_SERVER['_'] => /usr/bin/php
 $_SERVER['PHP_SELF'] => Standard input code
 $_SERVER['SCRIPT_NAME'] => Standard input code
 $_SERVER['SCRIPT_FILENAME'] => 
 $_SERVER['PATH_TRANSLATED'] => 
 $_SERVER['DOCUMENT_ROOT'] => 
-$_SERVER['REQUEST_TIME_FLOAT'] => 1633590991.036
-$_SERVER['REQUEST_TIME'] => 1633590991
+$_SERVER['REQUEST_TIME_FLOAT'] => 1633591194.5036
+$_SERVER['REQUEST_TIME'] => 1633591194
 $_SERVER['argv'] => Array
 (
     [0] => Standard input code

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cilefen’s picture

Status: Active » Closed (outdated)

I am closing this support request because there have been no recent comments.

tgoeg’s picture

Hi @cilefen!
I'd have expected you to add a comment regarding my question in #16 ;-)
> Is opcache on the CLI supposed to work or produce problems?
As that's the only relevant difference I can see. Though I'm not quite sure whether the php.ini is the one that really gets used. Maybe you have more ideas for others to try this?
I fear I'm unable to help in providing more debug info on Debian, as the instance running Debian has been phased out during the upgrade to 9.x. That is, it is still running 8.9.20 but won't be upgraded to 9.x as another (Ubuntu) server has taken over its function.
I can still pull config data some more time I guess, if need be.

Maybe @anoopjohn can also provide more feedback, please?

cilefen’s picture

AFAIK opcache on CLI can only cause issues. There is not even a shared memory space for it in most setups so it doesn’t in effect do anything.

aaron.ferris’s picture

I've come across this recently as well, although I can't add specific steps to reproduce I can say that this affected several modules I was enabling via Drush. Ban, twig_debugger as well as a custom module that was defining its own config form. All 3 settings forms would give the result from the opening post (class does not exist). Code for the forms all looked good.

Drupal 9.5.2, Drush 11.4.0.

Clearing the caches via Drush didn't help me, but clearing the caches via the UI did..... it's super odd. Adding this comment for anyone else who might come across this issue. Try clearing the site caches via the UI.

tgoeg’s picture

This sounds familiar.
Sometimes, problems like this even make you unable to use the UI, so no way of clearing the cache via the UI.
I don't know why there is a difference, but
drush -l <site> php:eval "drupal_flush_all_caches();"
is the function the UI triggers. This can be run from the CLI as well and saved my day a few times already.