PHP 4.0 Bug #7631: Log file created but not written to.
| From: | torben@php.net | Date: | Fri, 03 Nov 2000 23:32:34 +0000 |
| Subject: | PHP 4.0 Bug #7631: Log file created but not written to. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37042@lists.php.net to get a copy of this message | ||
From: torben@php.net
Operating system: Mandrake 7.0
PHP version: 4.0 Latest CVS (03/11/2000)
PHP Bug Type: Sablotron XSL
Bug description: Log file created but not written to.
The following script causes the requested logfile to be
created, but it is never written to:
<?php
error_reporting(E_ALL);
/* Intentionally introduce an extra space into file name. */
$xml_file = 'slashdot.xml';
$xsl_file = 'slashdot.xsl';
$xslt = xslt_create();
if (!xslt_openlog($xslt, '/tmp/sablot.log')) {
echo "Failed to set up log file.\n";
}
if (!xslt_run($xslt, $xsl_file, $xml_file)) {
echo "<pre>xslt_run() failed\n";
echo "Description: " . xslt_error() . "\n";
echo "All information:\n";
print_r(xslt_error($xslt));
echo "</pre>\n";
} else {
echo xslt_fetch_result($xslt);
}
xslt_closelog($xslt);
xslt_free($xslt);
?>
When I remove the logfile and do this from the command
line, it works:
~/public_html/phptest
shanna% tail /tmp/sablot.log
tail: /tmp/sablot.log: No such file or directory
~/public_html/phptest
shanna% sabcmd --log-file=/tmp/sablot.log slashdot.xsl slashdot.xml
Error [code:2] [URI:file:/home/torben/public_html/phptest/slashdot.xml] [line:5]
XML parser error 4: not well-formed
~/public_html/phptest
shanna% tail /tmp/sablot.log
Parsing 'file:/home/torben/public_html/phptest/slashdot.xsl'...
Parse done in 0.089 seconds
Parsing 'file:/home/torben/public_html/phptest/slashdot.xml'...
XML parser error 4: not well-formed
Destroying the hash table: 28 items in 2048 buckets
Destroying the arena: 6339 B asked, 65536 B allocated
--
Edit Bug report at: http://bugs.php.net/?id=7631&edit=1