|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38659 XSLT document() session_start() timeout
Submitted: 2006-08-30 16:12 UTC Modified: 2006-08-30 19:13 UTC
From: epridham at replicocorp dot com Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 5.1.5 OS: Windows XP
Private report: No CVE-ID: None
 [2006-08-30 16:12 UTC] epridham at replicocorp dot com
XSLT document() call times out when calling a php script that starts a valid session.  Calling the php script directly with a valid session ID works fine.

Happened on Apache 2.0.59 and IIS 6.0 on Windows.  PHP version is 5.1.6.

Reproduce code:
Note = SID


$xmlDoc = 'http://'. $_SERVER['HTTP_HOST'] . '/phpbug/main.xml';
$xslDoc = 'http://'. $_SERVER['HTTP_HOST'] . '/phpbug/main.xsl';

$xml = DomDocument::load($xmlDoc);
$xsl = DomDocument::load($xslDoc);

$xslt = new XSLTProcessor();
$xslt->setParameter(null, 'sid', session_id());

$doc = $xslt->transformToDoc($xml);
echo $doc->saveHTML();


<xsl:stylesheet	version="1.0" xmlns:xsl="">
  <xsl:output method="html" indent="no"/>
  <xsl:template match="*">
    <xsl:variable name="sessionxml">session.xml.php?SID=<xsl:value-of select="$sid"/></xsl:variable>
    <xsl:value-of select="/document/foo"/>
    <xsl:value-of select="document($sessionxml)/document/bar"/>

header('Content-Type: text/xml');

Expected result:

(This is the result if session_start() is commented out in session.xml.php)

Actual result:
PHP call times out, then:

Warning: XSLTProcessor::transformToDoc(http://localhost/phpbug/session.xml.php?SID=5vg8lbefrjnd72vjmhdensrmg2) [function.XSLTProcessor-transformToDoc]: failed to open stream: HTTP request failed!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-30 19:13 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

With your approach, 2 different processes are trying to open 
the same session file, which does lead to the time out (the 
2nd process waits until the first one closes the session)

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Apr 11 11:01:23 2021 UTC