Hello,
I started to get this after upgrading to WP 6.1 and other recent plugin updates. Haven’t had a chance to look into why. It’s happening when wp-cron.php runs:
PHP Warning: session_set_save_handler(): Cannot change save handler when headers already sent in .../wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 133
Hello, I see the following warnings with PHP 8.1:
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of WP_Session::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/includes/deprecated.php on line 206
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of WP_Session::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/includes/deprecated.php on line 213
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of WP_Session::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/includes/deprecated.php on line 220
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of WP_Session::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/includes/deprecated.php on line 227
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 217
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 148
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 238
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 260
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 173
[08-Aug-2022 01:18:00 UTC] PHP Deprecated: Return type of EAMann\Sessionz\Manager::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 195
]]>
Hello,
$_SESSION seems to not work properly ? if we edit $_SESSION content, we just loose content once we left the page.
Did i miss something? or plugin just dont work anymore?
PHP 7.2.X
WP 5.7
thanks
]]>How to Implementation or manage session for wpengine. Normal PHP session functions doesn’t work in wpengine.
]]>The WP Site Health checks display the following “Performance” warning:
A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.
Is that something to worry about?
]]>Im using your plugin to manage sessions for our website, but the sessions keep dropping randomly. I can’t find a consistent pattern either. One second my session will be there well within its timeout window then poof, just gone. Im echoing out the session variable to keep track of them and seemingly out of nowhere they just get destroyed.
My cookies too.
I dont think im running out of memory or anything, i believe its set up in the backend php.ini file to use memcached atm. It was using file, but that was creating the same behavior. Can you assist on this or provide some insight? I would greatly appreciate any help this has gone on for over a week now and is causing issues.
]]><?php
$_SESSION[“memberid”]=”3″;
?>
<script>
document.location=”/member-submission”;
</script>
If it were working the next page would see $_SESSION[“memberid”].
Just confirming I don’t need to do a session_start() anywhere. Also this is very frustrating.
]]>Hello,
we are currently using this plugin for handling session information.
We would like to embed our page to an externa domain via iframe. However, if we do so we loose the session functionality, as no cookie can be placed via external iframe.
Is there any suggestion on how this could be solved? Or, how would you tackle finding a solution?
Thanks for your help!
Alvaro
]]>Hi,
Using the plugin for a long time, it is very helpful.
We want to move our website to load malancer, and need to make sure sessions will not be saved on the server.
Can I configure WPSM so it will save sessions in the DB instead? How can I make sure what is the current configuration of the plugin?
Thank you.
]]>Hello,
For months a key section of our site has been broken due to the fact that our shared web host will not update yet to PHP 7.1. Is there a way to roll back WP Session Manager to an earlier version so that functionality can be restored. Our host is using PHP 7.0.33 and I don’t want to have to completely recode that section now.
]]>I have a file that runs some SQL queries using the wpdb
class. This file is accessed directly, has SHORTINIT
set to true
and includes the **wp-load.php** file.
Is it possible to load this plugin in this file and access session variables?
]]>I use the Session Manager plugin. I have two almost identical installations of the same website, one local for development and the other on remote server for production. Some weeks ago I discovered the message on the local site: “Another plugin is attempting to start a session with WordPress. WP Session Manager will not work!” First I commented out all the lines with session_start() in each plugin – one after another. The message remained. Then I saw that it was caused bei some initial statements like $_SESSION[‘var’] = []; in my own coding. After I had all of them removed, the message had gone.
Then I made a complete duplication of this local installation and loaded it up to the remote machine. All worked fine. But yesterday I discovered, that on the remote server in the backend this message is back: “Another plugin is … Session Manager will not work!”. Ugh! The only difference is that on the remote server Akismet plugin is activated, but Akismet not seems to start a session. And deactivating of Akismet won’t let disappear the message. So I went through the same procedure some weeks ago as I described above with the local version. But I could not find the causing plugin. In other words, the plugin that seems to be causing this conflict won’t start a session neither by session_start() nor by something like $_SESSION[‘var’] = [];.
What else can cause this conflict or trigger this message?
]]>Any attempt to use an auth service plugin (Authorizer for example, I have tried others with similar results) for CAS or ldap is causing logins to fail due to too many redirects.
I ran into this issue with the Participants Database plugin, and tracked it down to their inclusion of your WP Session Manager plugin. For testing purposes, I deactivated their plugin and installed yours, and am getting the same result. Can you suggest any way to resolve this issue?
]]>Plugin 1 on same.domain.com/page1:
$_SESSION[ 'data' ] = 123;
header("Location: https://same.domain.com/page2");
exit();
Plugin 2 on same.domain.com/page2 after redirect:
print_r( $_SESSION );
Array()
]]>
The latest plugin upgrade brought the following error messages:
[01-Mar-2019 05:15:02 UTC] PHP Warning: session_set_save_handler(): Cannot change save handler when headers already sent in .../public_html/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 133
[01-Mar-2019 05:15:02 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in .../public_html/wp-content/plugins/wp-session-manager/wp-session-manager.php on line 139
Would anyone have a clue why these warnings are appearing after the upgrade? How would I go finding what is causing the warnings? Thank you for any guidance.
]]>Hello,
I am seeing this error on admin screens:
Another plugin is attempting to start a session with WordPress. WP Session Manager will not work!
When I look at $_SESSION when the error is triggered, it exists but is empty. Should the plugin check whether it’s actually being used for something before giving up?
How do I track down what other plugin is using it?
PS: This error is new, right?
]]>I would like confirmation that I am understanding the following correctly.
While using WP Session Manager, I am seeing MANY stale sessions that do not delete themselves from the database. I am in an Ubuntu hosted environment where session.gc_probability is set to zero. This appears to be a default thing for Ubuntu/Debian. For those environments, expired session cleanup is done by way of a cron task – BUT those environments assume file-based sessions, not database sessions (such as WP Session Manager provides).
For such a scenario, would I be correct that I need to do session cleanup for expired sessions myself? Probably a short cron task that calls DataManager::clean()?
]]>Here is the error that I am seeing after update to 4.0.
[01-Jan-2019 18:37:49 UTC] PHP Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /home/xxxx/public_html/wp-content/plugins/wp-session-manager/includes/deprecated.php on line 15
]]>Hi!
I switched the site to PHP 7.2 and receive a warning in the logs:
PHP Warning: session_set_save_handler(): Cannot change save handler when session is active in /home/…/wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Manager.php on line 133
There was no such warning in PHP 7.1.
]]>I am attempting to authenticate non-Wordpress users using a remote database (it’s a long story). I would therefore like to assign a session to a users after they successfully logged in via my custom non-Wordpress login (which is within the WordPress site but is not related to WordPress auth). Using your plugin, is there a way to only create a session for a visitor once I have validated them? Thanks!
]]>Hi Eric,
great work in here. I see that the plugin quite changed for earlier versions. Any quick guide on how to integrate it into others plugins? So all developers could live quite and happy forever ??
Hi!
I’m seeing this error in apache error log many times in a row:
Call to a member function delete() on null <website path>/wp-content/plugins/wp-session-manager/includes/DatabaseHandler.php on line 205
Do you know what could be causing it? I’m running the latest plugin version.
Cheers!
]]>I moved a working site to a Digital Ocean Droplet, however the $_SESSION vars are always set to NULL, no matter what I do. I followed all the instructions in your documentation.
Any hints Eric?
Thank′s.
Hello,
Is it possible to define the session expire or live time please?
By the way, does this plugin support Multisites?
Alex
]]>I’ve updated WP Session Manager to the latest version and I get an error:
Parse error: syntax error, unexpected ‘[‘ in */wp-content/plugins/wp-session-manager/wp-session-manager.php on line 36
and it breaks my WordPress site. What is this and what can I do to resolve it?
Kind regards
]]>Hi there
After updating to latest Versions here (was on 1.x before) i’ve adjusted the code as needed to just use $_SESSION.
But sadly, $_SESSION is always NULL in my plugin. The wp-session-manager plugin gehts loaded before my plugin.
Any help/hint where to search would be nice.
Best
Stefan
Hi,
Is there a way to log out users if the session has been expired?
]]>after updating we are now getting the following error.
[12-Feb-2018 05:27:47 UTC] PHP Fatal error: Uncaught Error: Call to a member function toArray() on array in /var/www/xxxxxx.com/public_html/wp-content/plugins/tarot/inc/tarot-sessions.php:39
the line in question is
$cards = $wp_session[‘tarot_cards’]->toArray();
ANy ideas, i read in the chnagelog you made it backwards compatible?
]]>Just to let you know there is a conflict with Ninja Forms:
Fatal error: Cannot redeclare wp_session_cache_expire() (previously declared in /wp-content/plugins/ninja-forms/deprecated/includes/libraries/wp-session.php:22) in /wp-content/plugins/wp-session-manager/includes/deprecated.php on line 20
I am not sure if this is something that could be resolved with your plugin or theirs, but it’s better to be aware of this issue. When both plugins are running it takes down the site.
]]>Hi,
Do you have a tutorial or quick ‘how to’ for using the WP_SESSION_ENC_KEY
functionality?
Thanks
]]>