#38659 [NEW]: XSLT document() session_start() timeout
| From: | epridham at replicocorp dot com | Date: | Wed, 30 Aug 2006 16:12:45 +0000 |
| Subject: | #38659 [NEW]: XSLT document() session_start() timeout | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-101543@lists.php.net to get a copy of this message | ||
From: epridham at replicocorp dot com
Operating system: Windows XP
PHP version: 5.1.5
PHP Bug Type: XSLT related
Bug description: XSLT document() session_start() timeout
Description:
------------
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 session.name = SID
index.php:
<?php
session_start();
$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->importStylesheet($xsl);
$xslt->setParameter(null, 'sid', session_id());
$doc = $xslt->transformToDoc($xml);
echo $doc->saveHTML();
?>
main.xml:
<document>
<foo>Foo</foo>
</document>
main.xsl:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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"/>
</xsl:template>
</xsl:stylesheet>
session.xml.php:
<?php
session_start();
header('Content-Type: text/xml');
?>
<document>
<bar>Bar</bar>
</document
Expected result:
----------------
FooBar
(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!
--
Edit bug report at http://bugs.php.net/?id=38659&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38659&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38659&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38659&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38659&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38659&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38659&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38659&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38659&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38659&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38659&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38659&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38659&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38659&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38659&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38659&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38659&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38659&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38659&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38659&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38659&r=mysqlcfg