|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12783 xmlDocFile needs absolute path
Submitted: 2001-08-16 00:30 UTC Modified: 2002-10-27 19:36 UTC
From: nick at linuxmail dot org Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.0-dev OS: WinME
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nick at linuxmail dot org
New email:
PHP Version: OS:


 [2001-08-16 00:30 UTC] nick at linuxmail dot org
When loading an XML file with xmlDocFile using a relative path (ie the XML is in the same dir as the script), I get:

Fatal error: Call to a member function on a non-object in [script] at line [#]

The line it points to is the first time I try to reference the object returned by xmlDocFile. If I change this to an absolute path, it works fine. I've verified that the cwd is what I think it is, so... any ideas?



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-29 08:28 UTC]
For some reason PHP behaves a bit different under win32 than linux:


C:\phpdev>php -f bla/xmldocfiletest.php
current dir is C:\phpdev

$ php -f subtest/xmldocfiletest.php 
path is /home/mfischer/src/php/bugtest/domxml/subtest

See the difference?

This tests where run with a call to the system call (!) getcwd() [not php's user function] before the actual file IO happens through libxml2. So this is not a domxml problem but a general PHP problem.

Reclassifying (anyone know a better type?).
 [2002-09-20 19:57 UTC]
updated version.
 [2002-10-27 19:36 UTC]
This is not a php problem, but a regular windows problem.  Windows is a problem, but its not our fault :)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jun 16 08:01:24 2021 UTC