Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.x Fatal Error when Announcement is set #5194

Open
niemalsnever opened this issue Mar 9, 2024 · 2 comments
Open

PHP 8.x Fatal Error when Announcement is set #5194

niemalsnever opened this issue Mar 9, 2024 · 2 comments

Comments

@niemalsnever
Copy link

Describe the bug

Login fails after an announcement is set in IcingaWeb2, when using PHP-FPM 8.2 or 8.3, works with PHP-FPM 7.4. The following PHP Fatal Error is shown at login:

Fatal error
: Uncaught TypeError: setcookie(): Argument #3 ($expires_or_options) must be of type array|int, float given in /usr/share/icingaweb2/library/Icinga/Web/Response.php:421 Stack trace: #0 /usr/share/icingaweb2/library/Icinga/Web/Response.php(421): setcookie() #1 /usr/share/icingaweb2/library/Icinga/Web/Response.php(440): Icinga\Web\Response->sendCookies() #2 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Response/Abstract.php(768): Icinga\Web\Response->sendHeaders() #3 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(992): Zend_Controller_Response_Abstract->sendResponse() #4 /usr/share/icingaweb2/library/Icinga/Application/Web.php(461): Zend_Controller_Front->dispatch() #5 [internal function]: Icinga\Application\Web->Icinga\Application\{closure}() #6 {main} thrown in
/usr/share/icingaweb2/library/Icinga/Web/Response.php
on line
421

If /etc/icingaweb2/announcements.ini is removed, the login works again.

To Reproduce

  1. Create an announcement in icingaweb2.
  2. Log out of icingaweb2 and clear cookies and cache.
  3. Try logging back in.
  4. Login fails, the above PHP Fatal Error is shown.

Expected behavior

Login should work, the icingaweb2 dashboard should be displayed.

Your Environment

  • Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version 	         2.12.1
Git commit 	                 cd2daeb2cb8537c633d343a29eb76c54cd2ebbf2
PHP Version 	                 8.3.3-1+0~20240216.17+debian10~1.gbp87e37b

Loaded Libraries
icinga/icinga-php-thirdparty 	 0.12.1
icinga/icinga-php-library        0.13.1
Loaded Modules
director                         1.11.1
doc                              2.12.1
fileshipper                      1.2.0
incubator                        0.21.0
monitoring 		         2.12.1
x509 		                 1.3.2
  • Web browser used: Mozilla Firefox 123.0
  • Icinga 2 version used (icinga2 --version): 2.13.6-1
  • PHP version used (php --version): 8.3.3-1+0~20240216.17+debian10~1.gbp87e37b
  • Server operating system and version: Raspbian Buster
  • Webserver: nginx/1.14.2

Additional context

# cat /etc/icingaweb2/announcements.ini
[65ec81ff31c43]
author = "admin"
message = "test"
start = "1709998800"
end = "1709999100"
hash = "098f6bcd4621d373cade4e832627b4f6"
@moreamazingnick
Copy link
Contributor

can you reproduce this issue with another browser for example chrome?
is your OS a 32bit or 64 bit os?
if it is buster 32bit / arm can you try again with the 64 OS.
here is a link to a post that might help installing a 64 bit OS.
https://community.icinga.com/t/icinga-web-2-history-is-empty-with-no-items-found/13164/5

@niemalsnever
Copy link
Author

can you reproduce this issue with another browser for example chrome?

Yes, I can reproduce it in Chrome and Edge. Though I fail to understand how a Fatal PHP Error, which occurs on the server should be client/browser dependent.

is your OS a 32bit or 64 bit os? if it is buster 32bit / arm can you try again with the 64 OS. here is a link to a post that might help installing a 64 bit OS. https://community.icinga.com/t/icinga-web-2-history-is-empty-with-no-items-found/13164/5

It's 32bit. Since I don't want to reinstall my entire system, I cannot easily upgrade to a 64bit OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants