#17390 [Com]: dump_file doesn't work if path is not absolute
| From: | rrichards at digarc dot com | Date: | Sat, 14 Sep 2002 12:16:06 +0000 |
| Subject: | #17390 [Com]: dump_file doesn't work if path is not absolute | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19342@lists.php.net to get a copy of this message | ||
ID: 17390
Comment by: rrichards@digarc.com
Reported By: sysadmin@alexdupre.com
Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD and Windows 2000
PHP Version: 4.0CVS-2002-05-23
New Comment:
This is still a problem running under windows with any version of
apache (though different behavior than Apache2 on FreeBSD at least).
see bug 17779 for more information as they are related. This specific
bug can be fixed if the file path, being passed or when domxml is
writing to a file, is converted to the full path before being sent to
the libxml2 function calls.
I have a patch for this specific bug, but not sure about adding it as
the DTD issue (bug 17779) would still remain which would result in an
inconsistant implementation of file directory handling. (passing in
filesnames as parameters would work, but DTD references in the xml
would not unless they were full path names).
Previous Comments:
------------------------------------------------------------------------
[2002-06-05 12:40:36] rrichards@digarc.com
this is a possible apache2 problem (BSD running apache2). when run with
apache 1.3 it works correctly. unable to test with apache 2 now to
confirm. the windows issue was due to the libxml version. once upgraded
it works fine.
------------------------------------------------------------------------
[2002-06-04 14:56:25] sysadmin@alexdupre.com
2.4.20 on FreeBSD, 2.4.9 on Windows.
------------------------------------------------------------------------
[2002-06-04 14:42:53] rrichards@digarc.com
what version of libxml2 are you running? there was a bug in it which
would causes this error and has been fixed since 2.2.12.
------------------------------------------------------------------------
[2002-05-23 11:02:15] sysadmin@alexdupre.com
I think to have found a bug in the dump_file() function of the domxml
extension. If the path passed to the function is relative, the file is
not saved anywhere (first issue) and the function returns anyway the
number of bytes written (second issue).
From the sources it seems that dump_file simply calls xmlSaveFile from
libxml2, so maybe a path check should be done before the call.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17390&edit=1