PHP 7.4 conflict
-
I updated PHP to 7.4 and I got this error message: Fatal error: Cannot declare class ITSEC_Schema, because the name is already in use.
Any correction or anyone else getting this?
-
Hi David,
Please try and (temporarily) set the constant WP_DEBUG to true in the wp-config.php file. Hopefully this will provide some extra error info.
Hoping to get some additional info about the file/line where this is failing.
Oh, one other thing: Does the error reproduce in the latest plugin release (7.9.1) ?
To prevent any confusion, I’m not iThemes.
nlpro, thanks for the reply.
Yes, it reproduces on the latest release of the plugin.
Sorry, not going to set up the debug to true. I got fed up dealing with this conflict (and others) and deleted the plugin. I am doing this on all my sites.
I couldn’t delete it in the plugin manager, the conflict seemed to prevent that. I had to delete it via FTP and then go remove it from database.
Really, this was a final straw kind of thing for me. Lately, it’s one thing after another it seems and I am tired of wasting my time on it. Right now I am just using the security features in JetPack and keep everything updated. Not even sure a security plugin like iThemes is worth it now.
Same problem here. My client encountered a fatal error this morning after logging into wp-admin. Things I tried:
I manually updated the iThemes Security plugin via ftp so see if it was a stuck update problem, but the error persisted.
I renamed the plugin folder to disable it, and I was able to log in.
I updated WordPress and all other plugins prior to re-activating iThemes Security, and the error came back.
I turned on debug, but it reveals no other errors beyond this one.
The full error message is
Fatal error: Cannot declare class ITSEC_Schema, because the name is already in use in /path/to/site/wp-content/plugins/better-wp-security/core/lib/schema.php on line 3WordPress 5.7.2
PHP 7.4.19
iThemes Security 7.9.1Hi,
Can you provide a list of activated plugins ?
Would it be possible to deactivate all plugins and then try to only activate the iTSec plugin ?
This will help in ruling out the possibility of a plugin conflict.
+++++ To prevent any confusion, I’m not iThemes +++++
-
This reply was modified 4 years, 11 months ago by
nlpro.
… or alternatively temporarily add the code below to the functions.php file of the active theme:
add_action( 'admin_notices', 'showmewhichfile' ); function showmewhichfile() { $a = new \ReflectionClass( 'ITSEC_Schema' ); echo '<div class="notice notice-info"><p>' . sprintf( 'The class <strong>ITSEC_Schema</strong> is declared in the file: %s', $a->getFileName() ) . '</p></div>'; }This will show you a notice in the WordPress Dashboard telling you which file declared the ITSEC_Schema class for the current page request.
This kind of assumes there is another plugin (or piece of code somewhere) declaring the same class.Improved code version:
add_action( 'admin_notices', 'showmewhichfile' ); function showmewhichfile() { if ( class_exists( 'ITSEC_Schema' ) ) { $a = new \ReflectionClass( 'ITSEC_Schema' ); echo '<div class="notice notice-info"><p>' . sprintf( 'The class <strong>ITSEC_Schema</strong> is declared in the file: %s', $a->getFileName() ) . '</p></div>'; } else { echo '<div class="notice notice-info"><p>The class <strong>ITSEC_Schema</strong> is not declared.</p></div>'; } } -
This reply was modified 4 years, 11 months ago by
The topic ‘PHP 7.4 conflict’ is closed to new replies.