|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25508 domxml_open_file() does not work when using relative paths
Submitted: 2003-09-12 04:43 UTC Modified: 2003-09-12 15:20 UTC
From: mfladischer at gmx dot net Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.3 OS: *
Private report: No CVE-ID: None
 [2003-09-12 04:43 UTC] mfladischer at gmx dot net
I get a bool(false) when trying to open a xml-file with a relative path. It works as expected with FQ paths.

Reproduce code:
// example.xml is in the same directory as this script

Expected result:
A DOM-document object:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-12 06:32 UTC]
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 as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

According to config and sapi used relative paths can be relative to executable, server executable, base url or current directory. RTFM.
 [2003-09-12 11:45 UTC] mfladischer at gmx dot net
Please see the Reproduce code:
// example.xml is in the same directory as this script

the path is relative to the path where the script resides. i'm using the apache2 module so paths relative to the location of the script should work. but they do not work with domxml_open_file()!
 [2003-09-12 15:20 UTC]
In that case, libxml has a bug. Use ./somefile.xml instead.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 01:01:24 2021 UTC