Bug 270605 - www/glpi: Fatal error: Uncaught Error: Call to undefined function session_status()
Summary: www/glpi: Fatal error: Uncaught Error: Call to undefined function session_sta...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-02 18:27 UTC by O. Hartmann
Modified: 2024-04-18 22:35 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (mathias)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2023-04-02 18:27:42 UTC
After upgrade/reinstall of www/glpi on :FreeBSD 13.1-RELEASE-p7 releng/13.1-n250182-00935d2e533c amd64:

glpi-10.0.6,1 

the existing installation throws an error, shown below:

[...]
Fatal error: Uncaught Error: Call to undefined function session_status() in /usr/local/www/glpi/src/Session.php:220 Stack trace: #0 /usr/local/www/glpi/inc/config.php(51): Session::start() #1 /usr/local/www/glpi/inc/includes.php(53): include_once('/usr/local/www/...') #2 /usr/local/www/glpi/index.php(89): include('/usr/local/www/...') #3 {main} thrown in /usr/local/www/glpi/src/Session.php on line 220
Comment 1 Lohrmann 2023-04-25 22:40:33 UTC
I am running into the same issue after a FreeBSD upgrade from 13.1 to 13.2 (which is likely not even relevant here).
I am having GLPI glpi-10.0.3,1 with php80-8.0.26 and all its modules and with apache24-2.4.55, and all runs fine.

After upgrading to glpi-10.0.6,1 and related php81 upgrade (and all its modules), the same issue happens to me.
php81-sessions is installed, though.

Running a
"php bin/console glpi:system:check_requirements"
did note that php81-dom was missing, but after adding it, and all requirement checks passing, the error stayed unchanged.
Comment 2 Mathias Monnerville 2023-04-26 06:01:17 UTC
Thanks for reporting guys, will have a look today.
Comment 3 Mathias Monnerville 2023-04-26 11:51:30 UTC
@ohartmann and @lohrmann, what's the output of `pkg info -x php` on your existing installation?
Comment 4 Lohrmann 2023-04-26 19:44:12 UTC
On my current/functional 10.0.3,1 GLPI installation, the "pkg info -x php" looks as follows:

mod_php80-8.0.26
php80-8.0.26
php80-bz2-8.0.26
php80-ctype-8.0.26
php80-curl-8.0.26
php80-dom-8.0.26
php80-exif-8.0.26
php80-extensions-1.1
php80-fileinfo-8.0.26
php80-filter-8.0.26
php80-gd-8.0.26
php80-iconv-8.0.26
php80-imap-8.0.26
php80-intl-8.0.26_1
php80-ldap-8.0.26
php80-mbstring-8.0.26
php80-mysqli-8.0.26
php80-opcache-8.0.26
php80-pdo-8.0.26
php80-pdo_sqlite-8.0.26
php80-pear-1.10.13
php80-pear-XML_Parser-1.3.8
php80-pear-XML_Wddx-1.0.2
php80-pecl-APCu-5.1.22
php80-pecl-xmlrpc-1.0.0.r3_2,1
php80-phar-8.0.26
php80-posix-8.0.26
php80-session-8.0.26
php80-simplexml-8.0.26
php80-sodium-8.0.26
php80-sqlite3-8.0.26
php80-tokenizer-8.0.26
php80-xml-8.0.26
php80-xmlreader-8.0.26
php80-xmlwriter-8.0.26
php80-zip-8.0.26
php80-zlib-8.0.26
Comment 5 Mathias Monnerville 2023-05-06 15:38:52 UTC
(In reply to Lohrmann from comment #4)

Thanks, can you run the same command again but for your glpi 10.0.6 / php 8.1 installation please?

I installed a fresh GLPI 10.0.6 on my FreeBSD 13.1 and it works fine but I had to install the php81-dom and php81-filter packages manually. 

I will add them with the new GLPI 10.0.7 update available.

So you may be missing a PHP package.
Comment 6 Lohrmann 2024-04-18 22:35:27 UTC
Just wanting to close the loop on this one. After finally finding time to get back to this issue, I recently tried again upgrade (still from 10.0.3,1, this time to version 10.0.10,1)...and was running again into the same issue. However, this time I was able to work it out:

I noticed that package mod_php80 was still on its old/outdated version, while PHP already was on newer version, after I did a "pkg upgrade" for all packages.

So, I uninstalled mod_php80 and reinstalled mod_php82. This solved the original session_status issue for me.

Furthermore, I was then lacking the following further packages (according to GLPI sanity checker):
php82-xmlwriter
php82-xmlreader
php82-phar

After adding them manually as well, GLPI was happy, and I could move forward with the database upgrade and some additional apache24 adjustments (now required for security reasons; all documented on the GLPI website)

For my case, this ticket can be resolved.