ID:               38659
 Updated by:       [EMAIL PROTECTED]
 Reported By:      epridham at replicocorp dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         XSLT related
 Operating System: Windows XP
 PHP Version:      5.1.5
 New Comment:

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 http://www.php.net/support.php 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)




Previous Comments:
------------------------------------------------------------------------

[2006-08-30 16:12:45] epridham at replicocorp dot com

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 this bug report at http://bugs.php.net/?id=38659&edit=1

Reply via email to