php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30797 domxml_open_file() file access errors
Submitted: 2004-11-15 18:22 UTC Modified: 2004-11-15 18:35 UTC
From: joahking at yahoo dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.9 OS: winXP
Private report: No CVE-ID: None
 [2004-11-15 18:22 UTC] joahking at yahoo dot com
Description:
------------
hi there, 
I just move my PHP site from my linux box to a winXP-platform for testing. On linux everything worked. 

I have now PHP 4.3.9 (also tried with other versions) as a server module on apache 1.3.29 (Win32). 

I need to use the extension domxml but it gives some access errors.

This is my phpinfo result (php.ini have minor arrangements, like displaying error colors, my aliases, the extension activation and nothing else): 

...

Apache Version  Apache/1.3.29 (Win32) PHP/4.3.9 

...

domxml

DOM/XML  enabled  
DOM/XML API Version  20020815  
libxml Version  20611  
HTML Support  enabled  
XPath Support  enabled  
XPointer Support  enabled  
DOM/XSLT  enabled  
libxslt Version  1.1.7  
libxslt compiled against libxml Version  2.6.11  

....

The error is generated with any "any.xml", and:

$mydom = domxml_open_file("any.xml");

which turns on something about file access (see below) which is only been the case with the domxml, 'cos other file-accessers ( fopen ) access the any.xml.

With apache 2 gave the same error. Everything else (what I need and have seen, of course) works with PHP and apache, and browsing.

thanx in advance,
LSd
jk



Reproduce code:
---------------
any.xml (the molecules example from the PHP manual):

<?xml version="1.0"?>
<moldb>

    <molecule>
        <name>Alanine</name>
        <symbol>ala</symbol>
        <code>A</code>
        <type>hydrophobic</type>
    </molecule>

    <molecule>
        <name>Lysine</name>
        <symbol>lys</symbol>
        <code>K</code>
        <type>charged</type>
    </molecule>

</moldb>

and test.php (reside in the same path):

$mydom = domxml_open_file("any.xml");

Actual result:
--------------
Warning: domxml_open_file(): I/O in c:\program files\apache group\apache\htdocs\test\dom-test.php on line x

Warning: domxml_open_file(): warning : in c:\program files\apache group\apache\htdocs\test\dom-test.php on line 
x

Warning: domxml_open_file(): failed to load external entity "any.xml" in c:\program files\apache group\apache\htdocs\test\dom-test.php on line x

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-15 18:35 UTC] derick@php.net
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. 

Thank you for your interest in PHP.

This is just a permissions error.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 21:01:23 2020 UTC