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
[dev.icinga.com #10251] Icinga Web 2 fails to run with PHP7 #2027
Comments
Updated by elippmann on 2015-09-30 10:48:20 +00:00
|
Updated by reubenfarrelly on 2015-09-30 10:49:06 +00:00 I should add that this was tested with icinga-web-2 git as of commit e20d791 . |
Updated by elippmann on 2015-10-01 21:48:17 +00:00
Hi, Thanks for the report. This won't make it into the final release but we add support for PHP7 asap. Best, |
Updated by elippmann on 2015-11-20 13:11:14 +00:00
|
Updated by mfriedrich on 2015-12-03 20:50:34 +00:00 PHP 7 is now final: http://php.net/archive/2015.php#id2015-12-03-1 |
Updated by purplecarrot on 2016-01-24 15:37:12 +00:00 This is what I get with 2.1.2:
|
Updated by reubenfarrelly on 2016-01-24 21:20:56 +00:00 purplecarrot wrote:
I am getting that too now. I suspect there are multiple errors - this one now being the first. |
Updated by MichaelH_BE on 2016-01-27 03:36:58 +00:00 Hello This weekend I've updated my Raspberry Pi2 with Icinga2 and Icingaweb2 installed on it. Unfortunately since the update the Icingaweb2 is not working anymore. I always get the error message Fatal error: Class 'Zend_Controller_Request_Http' not found in /usr/share/webapps/icingaweb2/library/Icinga/Web/Request.php on line 13 Setup: [admin@alarmpi4 Web]$ yaourt -Q zendframework [admin@alarmpi4 Web]$ sudo pacman -Q icingaweb2 [admin@alarmpi4 Web]$ sudo pacman -Q apache [admin@alarmpi4 Web]$ uname -a What I already have done: [admin@alarmpi4 Web]$ php -r "echo get_include_path();" I also get the error when I call the methode on the command line I am still quite new so please do not hesitate to ask stupid question or make such recommendations. I placed the same question in the forum http://www.monitoring-portal.org and was asked to document the issue here as well. What I herewith do. Regards |
Updated by purplecarrot on 2016-01-27 13:55:15 +00:00 @lippser Although I'm not very experienced with PHP, I dug a bit and it seems that Zend_Loader_Autoloader is never called, only the Icinga one is. |
Updated by elippmann on 2016-01-27 15:26:54 +00:00
Hi all, Will be fixed tomorrow. Best, |
Updated by elippmann on 2016-01-28 11:32:24 +00:00 Please test :) |
Updated by icinga-kanban on 2016-01-28 11:36:55 +00:00 Build !#1227 triggered by the commits b5cbf49, ba9aead, dee6f4d, e45723c, 6ad40b5, 027aaac, 16bd78a, c1f7b2e, 41c05c3, 7fd5750, b043317, e9bc11d, f876ed0, 41c942d, 78c1e17, c963ee2, 9f79f9a, 5b7f4cd, 134061f, f7ba48e, f5945ff, ec177e7, 2e1e0bb passed successfully. Branch: origin/master |
Updated by purplecarrot on 2016-01-28 11:46:05 +00:00 lippser wrote:
This seems to work well, I had an issue with /etc/dashboards/ though, had to create it manually. Should I open another bug?
|
Updated by elippmann on 2016-01-28 11:51:13 +00:00 Thanks for the fast response. I fixed the other bug too. purplecarrot wrote:
|
Updated by reubenfarrelly on 2016-01-28 12:09:08 +00:00 lippser wrote:
Looks much better. I am going through the setup process again and at least now it loads the page. However I'm getting stuck at the Modules page. All items are green except the following: The PHP module LDAP is missing As they're yellow I'm assuming that they are not required, but optional. However I cannot click on the Next option. I've tried with latest Edge, Firefox and Chrome, and they all behave the same. Clicking on Next does nothing. As a second possible problem, are all of those modules being correctly identified with PHP7 ? php -i shows: pdo_mysql PDO Driver for MySQL => enabled I have mysql/mysqli support (but not LDAP or PostgreSQL) in my php7 build so I would have thought it would work but... |
Updated by elippmann on 2016-01-28 12:24:13 +00:00 One moment please :) |
Updated by reubenfarrelly on 2016-01-28 12:59:07 +00:00 lippser wrote:
That commit fixed it - detected properly and now I'm able to click through Next. Thanks :-) I hope that a system that really doesn't have MySQL support spits out an error message of some sort rather than silently failing though. |
Updated by reubenfarrelly on 2016-01-28 13:20:54 +00:00 reubenfarrelly wrote:
Last error - all the way through to the very end now and I'm getting this: Sorry! Failed to set up Icinga Web 2 successfully. Successfully connected to existing database "icinga-web2"... Module "doc" has been successfully enabled. The icinga-web2 database has 4 tables but they are all completely empty (0 rows). The Database Setup username is root (presumably this is only used for the database setup itself, not for regular access). I am not sure if this is a PHP7 specific error though. But aside from this error the actual setup wizard itself seems to be good now all the way to the end. |
Updated by reubenfarrelly on 2016-01-28 14:27:43 +00:00 reubenfarrelly wrote:
Turns out the problem was that the database account was being created by the setup wizard but was not being given permissions to access the newly created database. Once I manually fixed this up the setup was able to finish and I am now able to log in. After now being able to log in it looks like everything else is now all working with PHP7. Thanks! |
Updated by jmeyer on 2016-01-29 12:11:46 +00:00 Hey reubenfarrelly, Can you please show me the results of the following three queries while you're logged in from the host where Icinga Web 2 is running?
I'd like to investigate this error further, as it shouldn't actually happen during the setup wizard. Thanks, |
Updated by reubenfarrelly on 2016-01-29 12:55:51 +00:00 Johannes wrote:
Sure:
The steps to reproduce and fix:
Thanks, |
Updated by jmeyer on 2016-01-29 13:35:33 +00:00 Thanks. Did you create the user "icinga_web" prior to the wizard manually or by using phpmyadmin? If so, did you also grant any privileges for this user? Im asking, because the log you've posted clearly says that the database and the user already existed, but not all privileges were granted to the user. Or did you run the wizard once more prior to posting the log here? (i.e you've encountered the error, but the database and user were created by the wizard at this time.) |
Updated by reubenfarrelly on 2016-01-29 13:45:26 +00:00 Johannes wrote:
Hmm I did run the wizard more than once. I'll try a completely clean install in the next day both of the configs and database and come back to you with how it goes (and if it's reproducible). |
Updated by reubenfarrelly on 2016-02-02 12:21:50 +00:00 reubenfarrelly wrote:
I've just recreated this issue. A clean install, with no existing configuration. The icingaweb2 database was dropped along with the icinga-web2 username and the entire /etc/icingaweb2/ directory (I think this removes everything?). I created the /etc/icingaweb2/ directory and with the permissions as of the front page. Then I went through the wizard right to the end but was still greeted with this final message when finishing on the very last page: Creating new database "icinga-web2"... Module "doc" has been successfully enabled. The icinga-web2 user was created but not granted privileges to the icinga-web2 database. I've just granted that new user icinga-web2 full privileges to the icinga-web2 database and have been able to submit and complete the wizard again. So this certainly appears to be reproducible at least. |
Updated by jmeyer on 2016-02-02 12:51:30 +00:00
You have my thanks for reproducing this and confirming what I already suspected to be the case. I created a new issue: #11070 Closed as all php7 related issues were resolved. |
Updated by jmeyer on 2016-02-02 12:52:25 +00:00
|
PHP7 appears to be supported since release 2.2.0 Icinga/icingaweb2#2027
This issue has been migrated from Redmine: https://dev.icinga.com/issues/10251
Created by reubenfarrelly on 2015-09-30 10:40:04 +00:00
Assignee: elippmann
Status: Resolved (closed on 2016-02-02 12:51:30 +00:00)
Target Version: 2.2.0
Last Update: 2016-02-02 12:51:30 +00:00 (in Redmine)
I've been doing some testing with php-7.0.0-rc3 - now that the final release of php-7 is only a few weeks ago.
Unfortunately Icinga Web 2 (and 1 for that matter) both fail to run with php-7.0.0.
The problem occurs post installation, when first attempting to go to http://icinga2/ . A Fatal Error is shown in my browser and the apache error-log shows this:
[Wed Sep 30 20:33:09.673028 2015] [:error] [pid 3722] [client 2001:44b8:X] PHP Fatal error: Uncaught ErrorException: Only variables should be passed by reference in /usr/share/icinga-web2/library/Icinga/Util/Translator.php:259\nStack trace:\n#0 /usr/share/icinga-web2/library/Icinga/Util/Translator.php(259): Icinga\\Application\\ApplicationBootstrap~~Icinga\\Application\\{closure}(8, 'Only variables ...', '/usr/share/icin...', 259, Array)\n#1 [internal function]: Icinga\\Util\\Translator::Icinga\\Util\\{closure}(Array, Array)\n#2 /usr/share/icinga-web2/library/Icinga/Util/Translator.php(261): usort(Array, Object(Closure))\n#3 /usr/share/icinga-web2/library/Icinga/Application/Web.php(504): Icinga\\Util\\Translator::getPreferredLocaleCode('en-AU,en-US;q=0...')\n#4 /usr/share/icinga-web2/library/Icinga/Application/ApplicationBootstrap.php(615): Icinga\\Application\\Web~~>detectLocale()\n#5 /usr/share/icinga-web2/library/Icinga/Application/Web.php(92): Icinga\\Application\\ApplicationBootstrap->setupInternationalization()\n#6 /usr/share/icinga-web2/library/Icinga/Application/ApplicationBootstrap.php(337): Icinga\\Application\\We in /usr/share/icinga-web2/library/Icinga/Util/Translator.php on line 259
Soon after, this is also logged:
[Wed Sep 30 20:33:27.140443 2015] [:error] [pid 27638] [client 2001:44b8:X] PHP Fatal error: Cannot use Icinga\\Util\\String as String because 'String' is a special class name in /usr/share/icinga-web2/library/Icinga/Web/View/helpers/string.php on line 4
With the final release of php-7 not so far away it would be good if any Icinga Web 2/php-7 interoperability bugs were ironed out prior to release.
Changesets
2016-01-27 15:46:54 +00:00 by elippmann b043317
2016-01-27 15:46:55 +00:00 by elippmann 7fd5750
2016-01-27 15:52:32 +00:00 by elippmann c1f7b2e
2016-01-28 12:52:31 +00:00 by elippmann 32f8728
Relations:
The text was updated successfully, but these errors were encountered: