#17779 [Com]: DOMXML can't handle SYSTEM DTD

From: Date: Sat, 14 Sep 2002 11:51:56 +0000
Subject: #17779 [Com]: DOMXML can't handle SYSTEM DTD
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19341@lists.php.net to get a copy of this message
 ID:               17779
 Comment by:       rrichards@digarc.com
 Reported By:      flying@dom.natm.ru
 Status:           Open
 Bug Type:         DOM XML related
 Operating System: Windows 2000
 PHP Version:      4.2.1
 New Comment:

The problem lies with both Windows (any apache version) and Apache 2 on
other systems.  On windows at least, the current working directory for
libxml2 calls ends up being the apache directory.  See also bug 17390
(this bug is also a windows problem and not just Apache 2).

The example in this bug report works for loading the file as the file
is passed in as file('test.xml') rather than just the filename.
getcwd() will return the correct working directory as well. The problem
is that the file functions (including DTD references) the domxml
extension uses, are directly from libxml2, which when loaded in the
mentioned environments is loaded with apache and its working directory
being the apache directory.

Am unsure about a fix for this unless the current working directory can
be set via libxml2 calls. Have yet to find if this is possible.

Have only confirmed this using php as an apache module.


Previous Comments:
------------------------------------------------------------------------

[2002-08-14 12:24:11] flying@dom.natm.ru

I use Apache 1.3.20 with PHP run as CGI

------------------------------------------------------------------------

[2002-08-14 12:22:09] chregu@php.net

Hi

do you use apache 1.3 or apache2?

chregu

------------------------------------------------------------------------

[2002-06-18 09:36:03] flying@dom.natm.ru

echo getcwd() gives me correct path, DOMXML still throws a warning, i
wrote before (both with and without DOMXML_LOAD_COMPLETE_ATTRS)

------------------------------------------------------------------------

[2002-06-18 05:55:17] derick@php.net

Works fine for me with Linux, both the Apache module and CGI version. I
think that the WIndows thing doesn't change to the correct working
directory. Can you try this by putting an "echo getcwd()" just before
the call to xmldoc().

Derick

------------------------------------------------------------------------

[2002-06-16 07:36:56] flying@dom.natm.ru

Yes, it works well, when there is full path to external DTD specified.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/17779

-- 
Edit this bug report at http://bugs.php.net/?id=17779&edit=1



Thread (10 messages)

« previous php.bugs (#19341) next »