[horde] horde-active-sessions with PHP 7.3/7.4

Jan Schneider jan at horde.org
Tue Jan 19 18:22:25 UTC 2021


Zitat von Patrick Boutilier <boutilpj at ednet.ns.ca>:

> Can anybody explain why when running with php it always shows 0 but  
> when run with php-cgi it does show the proper number of sessions?  
> This is on a test server so only my session shows up.

This is because with PHP 7.4 access to session functions have been  
disabled in the CLI SAPI of PHP.

> [root at horde5 config]# php -v
> PHP 7.4.12 (cli) (built: Oct 27 2020 15:01:52) ( NTS )
> Copyright (c) The PHP Group
> Zend Engine v3.4.0, Copyright (c) Zend Technologies
>     with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies
>
>
> [root at horde5 config]# php-cgi -v
> PHP 7.4.12 (cgi-fcgi) (built: Oct 27 2020 15:01:52)
> Copyright (c) The PHP Group
> Zend Engine v3.4.0, Copyright (c) Zend Technologies
>     with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies
>
>
>
> [root at horde5 config]# php /usr/bin/horde-active-sessions
>
>
>
>
> [root at horde5 config]# php-cgi /usr/bin/horde-active-sessions
> X-Powered-By: PHP/7.4.12
> Set-Cookie: Horde5nspes=nqem3pvop8eavfcicelv1c5v7a; path=/;  
> domain=127.0.0.1; secure; HttpOnly
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate
> Pragma: no-cache
> Set-Cookie: horde_secret_key=nqem3pvop8eavfcicelv1c5v7a; path=/;  
> domain=127.0.0.1; secure; HttpOnly
> Content-type: text/html; charset=UTF-8
>
> 1
>
>
>
>
>
>
>
> Errors in /var/log/messages when running with just php:
>
>
> Nov 25 12:57:57 horde5 HORDE[678957]: [horde] PHP ERROR:  
> session_start(): Failed to read session data: user (path: ) [pid  
> 678957 on line 139 of  
> "/usr/share/pear/Horde/Core/Factory/SessionHandler.php"]
>
> Nov 25 12:57:57 horde5 HORDE[678957]: [horde] PHP ERROR:  
> session_decode(): Session is not active. You cannot decode session  
> data [pid 678957 on line 143 of  
> "/usr/share/pear/Horde/Core/Factory/SessionHandler.php"]
>
> Nov 25 12:57:57 horde5 HORDE[678957]: [horde] PHP ERROR:  
> session_destroy(): Trying to destroy uninitialized session [pid  
> 678957 on line 151 of  
> "/usr/share/pear/Horde/Core/Factory/SessionHandler.php"



-- 
Jan Schneider
The Horde Project
https://www.horde.org/



More information about the horde mailing list