ID: 14965
Comment by: [EMAIL PROTECTED]
Old Reported By: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating System: Windows 2000
PHP Version: 4.1.1
New Comment:

Unless the below is a typo, it's quite logical:
while (!feof ($xmlfile)) {
    $xml_file_contents = fgets($xmlfile, 4096);
    //echo $xml_file_contents;
}

should read:
while (!feof ($xmlfile)) {
    /notice the dot
    $xml_file_contents .= fgets($xmlfile, 4096);
    //echo $xml_file_contents;
}
Unless you have an xmlfile, consisting of 1 line, smaller that 4096
bytes, $xml_file_contents, will consist of the last line only.


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

[2002-01-14 08:21:44] [EMAIL PROTECTED]

Hi,

I can confrim Feddy's code works fine on Windows 2000 (thanks Freddy
:), however the code I submitted earlier still produces the error so
using either file or HTTP with fopen and using the array arguments of
xslt_process function still produces the error.

Andrew

------------------------------------------------------------------------

[2002-01-14 07:32:41] [EMAIL PROTECTED]

On Windows 98, Apache 1.3.22, PHP 4.1.1, Sablotron 0.71, I experienced
the same problem with 'xslt_process()', which I was able to solve using
the 'file://' specifier:

   $result = xslt_process($xh,
      'file://E:/Web/test.xml',
      'file://E:/Web/test.xsl');

Strange enough, since the command:

   $result = xslt_process($xh, 'test.xml', 'test.xsl');

runs just fine on FreeBSD 4.4, Apache 1.3.22, PHP 4.1.1, Sablotron
0.71.  On Windows however, the above command gives me error code 4:

   cannot open file 'd:/programs/apache/test.xsl'
   
because Sablotron is looking for the xsl file in the Apache program
directory.  After specifying the full file name for the xsl file:

   $result = xslt_process($xh, 'test.xml',
      'E:/Web/test.xsl');

I receive error code 63:

   unknown encoding ''

After using the 'file://' prefix for the xsl file and a full file name
for the xml file, I receive error code 2:

   XML parser error 9: junk after document element

Only when using the 'file://' prefix for both the xsml and xsl file,
xslt_process() seems to work fine for Windows:

   $result = xslt_process($xh,
      'file://E:/Web/test.xml',
      'file://E:/Web/test.xsl');

See also:

   http://archive.gingerall.cz/archives/sablot/msg01858.html


HTH, Freddy Vulto

------------------------------------------------------------------------

[2002-01-10 14:40:03] [EMAIL PROTECTED]

slight correction to my last message it should read

$file_path = "C:\\test\\";

:)

Andrew


------------------------------------------------------------------------

[2002-01-10 14:35:45] [EMAIL PROTECTED]

Hi,

$DOCUMENT_ROOT is a blank variable

also trying the file path rather than HTTP e.g.

$file_path = "C://test//";

Produces the same error.

All paths are correct

Andrew

------------------------------------------------------------------------

[2002-01-10 14:21:41] [EMAIL PROTECTED]

moved to "Documentation problem"


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/?id=14965


Edit this bug report at http://bugs.php.net/?id=14965&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to