php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7631 Log file created but not written to.
Submitted: 2000-11-03 18:32 UTC Modified: 2001-07-30 18:31 UTC
From: torben@php.net Assigned:
Status: Closed Package: Sablotron XSL
PHP Version: 4.0 Latest CVS (03/11/2000) OS: Mandrake 7.0
Private report: No CVE-ID: None
 [2000-11-03 18:32 UTC] torben@php.net
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-30 18:31 UTC] sterling@php.net
Please upgrade to the new XSLT extension (--enable-xslt 
--with-xslt-sablot) as development is no longer focused on 
the sablot extension.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC