we use this PHP Script to include an extension
libxml_use_internal_errors(true);
$sxe = simplexml_load_file('https://www.domain.com/path-to-file/filename.xml');
if ($sxe === false) {
echo "Laden des XML fehlgeschlagen\n";
foreach(libxml_get_errors() as $error) {
echo "\t", $error->message;
}
}
and get this error “failed to load external entity”.
When we deactivate your plugin everything works fine.
What have we to change to get this solved?
Best Regards
Marc
Sometimes we got the following warnings on the page:
Warning: simplexml_load_file(): I/O warning : failed to load external entity “/home/admin/web/88.99.83.44/public_html/wp-content/themes/lms/wpml-config.xml” in /home/admin/web/88.99.83.44/public_html/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 48 Warning: simplexml_load_file(): I/O warning : failed to load external entity “/home/admin/web/88.99.83.44/public_html/wp-content/plugins/paypal-for-woocommerce/wpml-config.xml” in /home/admin/web/88.99.83.44/public_html/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 63 Warning: simplexml_load_file(): I/O warning : failed to load external entity “/home/admin/web/88.99.83.44/public_html/wp-content/plugins/profile-builder/wpml-config.xml” in /home/admin/web/88.99.83.44/public_html/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 63 Warning: simplexml_load_file(): I/O warning : failed to load external entity “/home/admin/web/88.99.83.44/public_html/wp-content/plugins/woothemes-sensei/wpml-config.xml” in /home/admin/web/88.99.83.44/public_html/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 63 Warning: simplexml_load_file(): I/O warning : failed to load external entity “/home/admin/web/88.99.83.44/public_html/wp-content/plugins/wordpress-seo/wpml-config.xml” in /home/admin/web/88.99.83.44/public_html/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 63
I checked with validator wpml-config.xml files and they seem to be ok. As I said problem occurs sometimes. Most of the time the there are no warnings. If there is a warning refreshing the page removes it.
I have checked wpml-config.php with var_dump($xml); on line 49. And it seems that when there is no error it reads the file without problem. $xml contains object.
WP_DEBUG is set to false.
Could you please help to understand what is the problem and how it can be solved? It is very strange that the problem does not appear constantly and can be seen only sometimes.
Your help is very appreciated!
]]>I’m running svg-support with amazon-s3-and-cloudfront to upload svg media to s3. After some updates, the media library stopped working. Deactivating svg-support would let the media library function again. The error log contains entries like the following:
PHP Warning: simplexml_load_file(): s3eucentral1://timumcms/
wp-content/uploads/sites/6/2016/08/15155314/logo_timum_333333.svg:1: parser error : Start tag expected, '<' not found in /var/app/current/wp-content/plugins/svg-support/functions/attachment-modal.php on line 34, referer: https://www.timum.de/wp-admin/upload.php
PHP Warning: simplexml_load_file(): \x1f\x8b\b in /var/app/current/wp-content/plugins/svg-support/functions/attachment-modal.php on line 34, referer: https://www.timum.de/wp-admin/upload.php
PHP Warning: simplexml_load_file(): ^ in /var/app/current/wp-content/plugins/svg-support/functions/attachment-modal.php on line 34, referer: https://www.timum.de/wp-admin/upload.php
PHP Fatal error: Call to a member function attributes() on boolean in /var/app/current/wp-content/plugins/svg-support/functions/attachment-modal.php on line 35, referer: https://www.timum.de/wp-admin/upload.php
Without much debugging, I hacked together the following and the media library is working again with svg-support enabled.
// attachment-modal.php:32
function bodhi_svgs_get_dimensions( $svg ) {
$svg = simplexml_load_file( $svg );
if($svg === FALSE) {
$width = '0';
$height = '0';
} else {
$attributes = $svg->attributes();
$width = (string) $attributes->width;
$height = (string) $attributes->height;
}
return (object) array( 'width' => $width, 'height' => $height );
}
Maybe you want to apply this as patch or build a patch for my issue based on that.
Enjoy your day,
Basti
and after i investigate further. even when you put simple codes (to eliminate more stuff), so the problem is youtube request is blocked?
$xml=simplexml_load_file(‘https://www.dailymotion.com/services/oembed?format=xml&url=https://www.dailymotion.com/video/xoxulz_babysitter_animals’);
$xml2 = simplexml_load_file(“https://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-UUx10KOWIE&format=xml”);
when you echo $xml2->html;
it is empty.
the request gets blocked, or not sent tru youtube.
likewise with the json option.
please help me guys. pls. pls. im stressed by this for almost 48 hours. need to launch the site. pls. pls. great thanks .
function dati_tbcrew($atts){
global $user_login;
get_currentuserinfo();
$xml=simplexml_load_file("porva.xml") or die("Error: Cannot create object");
switch($xml->name['nome']){
case $user_login: $out=$xml->name->content;break;
default:break;
}
return $out;
}
add_shortcode('dati_tbcrew', 'dati_tbcrew');
Unfortunately when I call the shortcode in a WP page it prints out “Error: Cannot create object”. The XML file is in the child theme folder with functions.php. I even tried to put the server folder route in with the file’s name in simplexml_load_file but it still isn’t working. How can I get it working? Is it even the right procedure? Thanks in advance.
]]>Could you change your code to use curl instead, to better support shared hosting users? Or perhaps send the required code changes to me at least? I could not figure out how to code all those changes myself.
Thank you for your time
https://www.ads-software.com/plugins/wp-cloudy/
]]>Warning: simplexml_load_file() [function.simplexml-load-file]: https:// wrapper is disabled in the server configuration by allow_url_fopen=0
Any workaround available that doesn’t involve allow_url_fopen to be on? thanks in advance.
https://www.ads-software.com/extend/plugins/foursquare-checkins/
]]>To ensure I’ve got the right path I’ve used the full absolute url to where it is, which works in a browser, but not through the template page. If I switch to the same xml file on another site it works?!?
Any ideas on how to fix this would be very much appreciated.
]]>