#39823 [Com]: DOMDocument::load() trims off end of include path
| From: | smlerman at gmail dot com | Date: | Thu, 14 Dec 2006 14:05:23 +0000 |
| Subject: | #39823 [Com]: DOMDocument::load() trims off end of include path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106354@lists.php.net to get a copy of this message | ||
ID: 39823
Comment by: smlerman at gmail dot com
Reported By: esayre at olemiss dot edu
Status: Feedback
Bug Type: DOM XML related
Operating System: Red Hat Enterprise Linux 3
PHP Version: 5.2.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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