#39823 [Fbk->Opn]: DOMDocument::load() trims off end of include path
| From: | esayre at olemiss dot edu | Date: | Thu, 14 Dec 2006 15:30:47 +0000 |
| Subject: | #39823 [Fbk->Opn]: DOMDocument::load() trims off end of include path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106358@lists.php.net to get a copy of this message | ||
ID: 39823
User updated by: esayre at olemiss dot edu
Reported By: esayre at olemiss dot edu
-Status: Feedback
+Status: Open
Bug Type: DOM XML related
Operating System: Red Hat Enterprise Linux 3
PHP Version: 5.2.0
New Comment:
Thank you for that, I looked in the documentation to see if
that was the fact, but could not find it in the documentation.
That raises another question though, as my script's working
directory should have been /var/www/code/DataGeneral/
ChronicMan/ and not /var/www...
I had already resolved my problem by simply using an absolute
path, however if helpful I can continue investigating this.
Previous Comments:
------------------------------------------------------------------------
[2006-12-14 14:05:21] smlerman at gmail dot com
Unless it has changed in 5.2, DOMDocument->load() doesn't use
include_path. You have to give it an absolute path or a path relative
to the current working directory.
------------------------------------------------------------------------
[2006-12-14 05:42:12] chregu@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-12-13 22:59:01] esayre at olemiss dot edu
Description:
------------
While trying to load an XML document into a PHP script that
runs through the CLI I ran into the following error.
PHP Warning: DOMDocument::load(): I/O warning : failed to
load external entity "/var/www/GrahamCracker/FARIntegration/
ORSPRequestTemplate.xml" in /var/www/code/GrahamCracker/
FARIntegration/SynchronizeDatabases.php on line 126
PHP Fatal error: Call to a member function appendChild() on a
non-object in /var/www/code/GrahamCracker/FARIntegration/
SynchronizeDatabases.php on line 132
The include path was set properly as "/var/www/code" but the
DOMDocument::load() method tried to use "/var/www" which is
not listed in the include path.
Actual result:
--------------
PHP Warning: DOMDocument::load(): I/O warning : failed to
load external entity "/var/www/GrahamCracker/FARIntegration/
ORSPRequestTemplate.xml" in /var/www/code/GrahamCracker/
FARIntegration/SynchronizeDatabases.php on line 126
PHP Fatal error: Call to a member function appendChild() on a
non-object in /var/www/code/GrahamCracker/FARIntegration/
SynchronizeDatabases.php on line 132
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39823&edit=1