Including this plugin via an MU plugin
-
I read the entry under Troubleshooting…
If you see an error like “Fatal error: session_start(): Failed to initialize storage module: user (path: ) in …/code/wp-content/plugins/plugin-that-uses-sessions/example.php on line 2” you likely have a plugin in the mu-plugins directory that is instantiating a session prior to this plugin loading. To fix, you will need to deactivate this plugin and instead load it via an mu-plugin that loads first, e.g. create an mu-plugin called 00.php and add a line in it to include the wp-native-php-sessions/pantheon-sessions.php file and the problem should disappear.
so I made a new plugin called 00 and put it in the mu-plugins folder. it doesn’t fix the error though, i”m still getting
“Fatal error: session_start(): Failed to initialize storage module: user (path: )”here’s my plugin code:
<?php /* Plugin Name: 00 */ if ( isset( $_ENV['PANTHEON_ENVIRONMENT'] ) ) : require_once ABSPATH . '/wp-content/plugins/wp-native-php-sessions/pantheon-sessions.php'; endif; # Ensuring that this is on Pantheon
How can i know if this plugin is activated since there’s admin activation like there is for the regular plugins?
- The topic ‘Including this plugin via an MU plugin’ is closed to new replies.