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

[dev.icinga.com #10338] Debian: Failed to open stream HTMLPurifier/HTMLPurifier.php #2076

Closed
icinga-migration opened this issue Oct 9, 2015 · 11 comments
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Oct 9, 2015

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

Created by remyl on 2015-10-09 08:53:58 +00:00

Assignee: (none)
Status: Resolved (closed on 2015-11-26 10:20:06 +00:00)
Target Version: 2.1.1
Last Update: 2016-01-28 09:51:24 +00:00 (in Redmine)


Hi,

I updated icingaweb2 in version 2.0.0-1~debmon70+1 on debian server.

Since, in Hosts Problems and Unknow, we have this error :

"Warning: Uncaught exception 'ErrorException' .... failed to open stream : no such file or directory /usr/share/icingaweb2/modules/monitoring/application/views/helpers/PluginOutput:88 ...."

I desactived/activated monitoring modules but it fails again.

Debian Version : 7.9

Attachments

Changesets

2015-11-26 10:16:21 +00:00 by elippmann c88d034

monitoring: Fix HTMLPurifier includes

fixes #10338

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Oct 9, 2015

Updated by remyl on 2015-10-09 09:07:31 +00:00

I don't know if there is a link but debug was activated with 43Go of logfile : I cleaned logfile and desactivated debuglog.
I also restarted icinga2.

If it can help

icinga2 feature list 
Disabled features: debuglog
Enabled features: api checker ido-mysql livestatus mainlog notification
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Oct 12, 2015

Updated by viaLAN on 2015-10-12 06:58:41 +00:00

For me this worked on Debian Jessie:

--- PluginOutput.php.orig       2015-10-02 12:16:57.000000000 +0200
+++ PluginOutput.php    2015-10-12 08:55:10.070608702 +0200
@@ -85,8 +85,8 @@
     {
         if (self::$purifier === null) {
             require_once 'HTMLPurifier/Bootstrap.php';
-            require_once 'HTMLPurifier/HTMLPurifier.php';
-            require_once 'HTMLPurifier/HTMLPurifier.autoload.php';
+            require_once 'HTMLPurifier.php';
+            require_once 'HTMLPurifier.autoload.php';

             $config = HTMLPurifier_Config::createDefault();
             $config->set('Core.EscapeNonASCIICharacters', true);
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Oct 12, 2015

Updated by remyl on 2015-10-12 09:41:37 +00:00

  • File added icingaweb2-2.jpg

Sorry, Here is the complete error.
It seems that HTMLPurifier.php is missing.

cd /usr/share/icingaweb2/modules/monitoring
find . -name "HTMLPurifier.php"
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Oct 27, 2015

Updated by ybinnenweg on 2015-10-27 11:59:11 +00:00

I was experiencing the same issues as remyl. It worked perfectly again after applying the patch by viaLAN.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 26, 2015

Updated by elippmann on 2015-11-26 10:04:46 +00:00

  • Duplicated set to 10437
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 26, 2015

Updated by elippmann on 2015-11-26 10:05:21 +00:00

  • Duplicated set to 10652
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 26, 2015

Updated by elippmann on 2015-11-26 10:05:48 +00:00

  • Subject changed from Icingaweb2 : Failed to open stream : HTMLPurifier/HTMLPurifier.php to Debian: Failed to open stream HTMLPurifier/HTMLPurifier.php
  • Category changed from Dashboard to Vendor Libraries
  • Target Version set to 2.1.1
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 26, 2015

Updated by elippmann on 2015-11-26 10:20:06 +00:00

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

Applied in changeset c88d034.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jan 20, 2016

Updated by shaunsmiley on 2016-01-20 20:56:52 +00:00

This issue has not been solved. The patch no longer works on new installs, although it DOES work on existing installs.

It's not clear how old the install needs to be. My case is an icinga2 server with icingaweb2 installed in July 2015, both installed on Ubuntu 14.04 using the following repo:
deb http://packages.icinga.org/ubuntu icinga-trusty main
.

A brand new install today, Jan 20, 2016, does not contain the file HTMLPurifier.php at all. It's unclear what diff needs to be applied to get this back to a working state.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jan 28, 2016

Updated by JayNewman on 2016-01-28 02:29:27 +00:00

Confirmed.
Not every page, but many pages were faulting with the above error.
Found that there were no "HTMLPurifier" files or directories under /usr/share/icingaweb2.
Temporary work-around was to install an earlier (Beta) version to a different server, and copy over the required php files.
Possibly not caught in testing if the environment was an upgrade rather than a clean install.

Cheers

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jan 28, 2016

Updated by elippmann on 2016-01-28 09:51:24 +00:00

Hi,

Debian and Ubuntu packages do not respect this change. I hope I'll get this sorted out next week. In the meantime just install php-htmlpurifier.

Best,
Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.