From: ivan dot enderlin at hoa-project dot net
Operating system: All
PHP version: master-Git-2012-07-16 (Git)
Package: SimpleXML related
Bug Type: Bug
Bug description:simplexml_load_file does not file if
libxml_disable_entity_loader(true)
Description:
------------
The function simplexml_load_file() failed to open any file (existing or
not) if libxml_disable_entity_loader(true) has been called.
I have tried with simplexml_load_string(), it works; same with new
SimpleXMLElement() etc. The bug is restricted to the simplexml_load_file()
function.
Test script:
---------------
<?php
libxml_use_internal_errors(true);
libxml_disable_entity_loader(true);
$xml = simplexml_load_file('foo');
print_r(libxml_get_errors());
var_dump($xml);
Expected result:
----------------
Array
(
)
â¦
Actual result:
--------------
Array
(
[0] => LibXMLError Object
(
[level] => 1
[code] => 1549
[column] => 0
[message] => failed to load external entity "foo"
[file] =>
[line] => 0
)
)
bool(false)
--
Edit bug report at https://bugs.php.net/bug.php?id=62577&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62577&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62577&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62577&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62577&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62577&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62577&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62577&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62577&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62577&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62577&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62577&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62577&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62577&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62577&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62577&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62577&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62577&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62577&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62577&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62577&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62577&r=mysqlcfg