|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72050 Problems loading XSLT style sheets from some, but not all, PHP-FPM workers
Submitted: 2016-04-18 14:18 UTC Modified: 2021-08-08 04:22 UTC
From: dirkjan at ochtman dot nl Assigned: cmb (profile)
Status: No Feedback Package: FPM related
PHP Version: 5.6.20 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dirkjan at ochtman dot nl
New email:
PHP Version: OS:


 [2016-04-18 14:18 UTC] dirkjan at ochtman dot nl
In one of my legacy websites, I'm using XSLT using the `XSLTProcessor` class from the xslt extension:

function process() {
    $xslt = new XSLTProcessor();
    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/" in /var/www/ on line 315

Warning: XSLTProcessor::importStylesheet(): compilation error: file /var/www/ line 14 element include in /var/www/ on line 315

Warning: XSLTProcessor::importStylesheet(): xsl:include : unable to load /var/www/ in /var/www/ 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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-18 14:23 UTC] dirkjan at ochtman dot nl
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.
 [2021-07-28 12:11 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-28 12:11 UTC]
Do you still experience this issue with any of the actively
supported PHP versions[1]?

[1] <>
 [2021-08-08 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Oct 22 02:03:35 2021 UTC