Bug #72050 [Opn]: Problems loading XSLT style sheets from some, but not all, PHP-FPM workers

From: Date: Mon, 18 Apr 2016 14:23:35 +0000
Subject: Bug #72050 [Opn]: Problems loading XSLT style sheets from some, but not all, PHP-FPM workers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200630@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72050&edit=1 ID: 72050 User updated by: dirkjan at ochtman dot nl Reported by: dirkjan at ochtman dot nl Summary: Problems loading XSLT style sheets from some, but not all, PHP-FPM workers Status: Open Type: Bug Package: FPM related Operating System: Linux PHP Version: 5.6.20 Block user comment: N Private report: N New Comment: Some further info: PHP-FPM worker running as apache:apache. File permissions: djc@enrai http $ ls -l total 14 drwxr-xr-x 14 djc users 600 Oct 31 2012 assets (...) djc@enrai http $ ls -l assets/ total 185 (...) drwxrwxr-x 2 djc users 168 Nov 2 2012 xsl djc@enrai http $ ls -l assets/xsl/ total 44 -rw-r--r-- 1 djc users 8910 Oct 4 2015 basic.xsl (...) So, there should not be any permission problems. Previous Comments: ------------------------------------------------------------------------ [2016-04-18 14:18:54] dirkjan at ochtman dot nl Description: ------------ In one of my legacy websites, I'm using XSLT using the XSLTProcessor class from the xslt extension: function process() { $xslt = new XSLTProcessor(); $xslt->importStylesheet($this->xsl); foreach ($this->params as $name => $value) { $xslt->setParameter('', $name, $value); } return $xslt->transformToXML($this->xml); } The XSLT stylesheet I'm using also does some includes, with paths relative to the executed PHP script: <xsl:include href="assets/xsl/basic.xsl" /> However, since migrating to PHP-FPM, I've found that sometimes, the worker processes get into a state where some workers work correctly, however some workers fail to find the included XSL sheets, resulting in errors: Warning: XSLTProcessor::importStylesheet(): I/O warning : failed to load external entity "/var/www/hebe.nl/http/assets/xsl/basic.xsl" in /var/www/hebe.nl/http/include/classes.sys.php on line 315 Warning: XSLTProcessor::importStylesheet(): compilation error: file /var/www/hebe.nl/http/ line 14 element include in /var/www/hebe.nl/http/include/classes.sys.php on line 315 Warning: XSLTProcessor::importStylesheet(): xsl:include : unable to load /var/www/hebe.nl/http/assets/xsl/basic.xsl in /var/www/hebe.nl/http/include/classes.sys.php on line 315 When restarting PHP-FPM, the problem fixes itself, but that's not a very nice way to solve it. :) Expected result: ---------------- XSLT includes should work (or not) consistently. Actual result: -------------- Reloading the page sometimes results in the correct HTML, sometimes has errors. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72050&edit=1

« previous php.bugs (#200630) next »