Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #10252] Doctrine fails to execute sql queries with php-7.0.0-rc3 #1366

Closed
icinga-migration opened this issue Sep 30, 2015 · 5 comments
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10252

Created by reubenfarrelly on 2015-09-30 11:06:40 +00:00

Assignee: mhein
Status: Resolved (closed on 2016-01-08 09:05:03 +00:00)
Target Version: 1.14
Last Update: 2016-01-13 09:47:57 +00:00 (in Redmine)

Icinga Version: 2.3.10
Icinga Web Version: 1.13.1
IDO Version: 1.13.0
OS Version: Gentoo Linux x86_64
DB Type: MySQL
DB Version: 10.1.7
Browser Version: Firefox 41 and Chrome 45

I've been testing php-7.0.0-rc3 against as many applications as I can and I've encountered breakage with icinga web 1.x (and also web 2.x - but the bug is different for that).

Upon upgrading to 7.0.0-rc3 I can authenticate but no longer browse to http://icinga/ The browser simply throws a white page.

Debug logs show the following error:

[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider: Object (name=internal) initialized
[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider: Object (name=auth_key) initialized
[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider: Object (name=http-basic-authentication) initialized
[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider.HTTPBasicAuthentification: Got header data: REMOTE_USER=reuben
[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider.HTTPBasicAuthentification: Got header data: AUTH_TYPE=Digest
[Wed Sep 30 21:03:11 2015] [debug] Auth.Provider.HTTPBasicAuthentification: Got data (auth_name=reuben, auth_type=digest)
[Wed Sep 30 21:03:11 2015] [debug] Auth.Dispatch: Starting authenticate (username=reuben)
[Wed Sep 30 21:03:11 2015] [info] Auth.Dispatch: Converting username to lowercase
[Wed Sep 30 21:03:11 2015] [debug] Auth.Dispatch: Userdata found in db (uid=2)
[Wed Sep 30 21:03:11 2015] [debug] Auth.Dispatch: Authoritative provider found (provider=http-basic-authentication, authid=reuben)
[Wed Sep 30 21:03:11 2015] [debug] Auth.Dispatch: Successful authentication (provder=http-basic-authentication)
[Wed Sep 30 21:03:11 2015] [fatal] Uncaught AppKitPHPError: PHP Error Array to string conversion (/usr/share/icinga/icinga-web/lib/doctrine/lib/Doctrine/Relation.php:465) (/usr/share/icinga/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:52)

The apache error log also shows:

[Wed Sep 30 21:03:11.271222 2015] [:error] [pid 27639] [client 2001:44b8:X] PHP Fatal error: Method Doctrine_Relation_LocalKey::__toString() must not throw an exception in /usr/share/icinga/icinga-web/lib/doctrine/lib/Doctrine/Collection.php on line 0

Ideally this bug should be fixed, but if php-7.0.0 is not going to be supported with Icinga Web 1.x then I think it should at least be clearly documented.

Changesets

2016-01-08 09:01:41 +00:00 by mhein e8dfebb

Doctrine compatibillity with php 7

fixes #10252
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-26 08:35:56 +00:00

  • Target Version set to Backlog

Sounds like Doctrine (the ORM layer) is not compatible with PHP 7.0.0 yet, or one would need to update their framework. Not sure how much impact this has.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-26 08:36:17 +00:00

  • Subject changed from Icinga Web 1.x Web Fails to execute with php-7.0.0-rc3 to Doctrine fails to execute sql queries with php-7.0.0-rc3

@icinga-migration
Copy link
Author

Updated by reubenfarrelly on 2016-01-04 02:03:22 +00:00

dnsmichi wrote:

Sounds like Doctrine (the ORM layer) is not compatible with PHP 7.0.0 yet, or one would need to update their framework. Not sure how much impact this has.

It looks like the fix for this to allow the code to work under PHP 7 is actually very simple:

doctrine/doctrine1#69

I have manually patched my installation and can confirm that the 3 changes listed resolve this problem.

Given how small the change is it would be good if this could be committed and included in the next release of code.

@icinga-migration
Copy link
Author

Updated by mhein on 2016-01-08 09:05:03 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset e8dfebb.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-13 09:47:57 +00:00

  • Assigned to set to mhein
  • Target Version changed from Backlog to 1.14

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

No branches or pull requests

1 participant