Author Topic: [SOLVED] Session expired or invalid with PHP7.1  (Read 16952 times)

Offline Rhobur

  • Newbie
  • *
  • Posts: 2
[SOLVED] Session expired or invalid with PHP7.1
« on: July 22, 2018, 08:49:04 AM »
Issue: can't login on latest RC on Debian 9.4 with PHP7.1
Cause: session not working
After searching a lot and finding nothing to help with this error I discovered that starting with PHP7 the null values are not accepted anymore, a string has to be returned on a read function.
The fix is to change the return value of the db_read function in rcube_session.php (~ line 185) from null to ''.
Hope it helps!
« Last Edit: July 22, 2018, 08:56:31 AM by Rhobur »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,843
Re: [SOLVED] Session expired or invalid with PHP7.1
« Reply #1 on: July 22, 2018, 12:22:13 PM »
What version of Roundcube are you running exactly? PHP 7 compatibility was introduced in version 1.2 (released in 2016). There were also compatibility fixes for 7.1 versions 1.2.3 and 1.3 according to the changelog. The code you referenced looks like its from 1.1 or earlier.
« Last Edit: July 22, 2018, 12:25:51 PM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline Rhobur

  • Newbie
  • *
  • Posts: 2
Re: [SOLVED] Session expired or invalid with PHP7.1
« Reply #2 on: July 25, 2018, 03:22:33 PM »
He, he was 1.0.1, upgrading now to latest 1.3.6