Title: PHP Warning: SimpleXMLElement
Last modified: August 31, 2016

---

# PHP Warning: SimpleXMLElement

 *  [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/)
 * this error appeared in the website, the next thing i know is the website stopped
   responding, and when it does, it responds soooooo slowly, this is the complete
   error:
 * PHP Warning: SimpleXMLElement::asXML(): xmlEscapeEntities : char out of range
   in /home/mywebsite/public_html/wp-includes/embed.php on line 720
 * any ideas???

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335504)
 * Temporarily put this at line 719. It may show the string that’s causing the problem.
   You are looking for a non-UTF8 character: a non-English character perhaps.
 *     ```
       var_dump($value);
       ```
   
 *  Thread Starter [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335518)
 * OK!, thanks, I’ll try it and see what happens!
 *  Thread Starter [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335522)
 * 696 /**
    697 * Creates an XML string from a given array. 698 * 699 * [@since](https://wordpress.org/support/users/since/)
   4.4.0 700 * [@access](https://wordpress.org/support/users/access/) private 701*
   702 * [@param](https://wordpress.org/support/users/param/) array $data The original
   oEmbed response data. 703 * [@param](https://wordpress.org/support/users/param/)
   SimpleXMLElement $node Optional. XML node to append the result to recursively.
   704 * [@return](https://wordpress.org/support/users/return/) string|false XML
   string on success, false on error. 705 */ 706 function _oembed_create_xml( $data,
   $node = null ) { 707 if ( ! is_array( $data ) || empty( $data ) ) { 708 return
   false; 709 } 710 711 if ( null === $node ) { 712 $node = new SimpleXMLElement(‘
   <oembed></oembed>’ ); 713 } 714 715 foreach ( $data as $key => $value ) { 716
   if ( is_numeric( $key ) ) { 717 $key = ‘oembed’; 718 } 719 var_dump($value); 
   720 if ( is_array( $value ) ) { 721 $item = $node->addChild( $key ); 722 _oembed_create_xml(
   $value, $item ); 723 } else { 724 $node->addChild( $key, esc_html( $value ) );
   725 } 726 } 727 728 return $node->asXML(); 729} 730
 *  Thread Starter [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335523)
 * It didn’t work…
    BTW, there is not any non-English character, but still the server’s
   log shows this error only -AND- the website doesn’t respond… Any idea ?
 *  Thread Starter [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335535)
 * what!? wait, it’s gone!that error is gone but now i have this new error!:
 * error Query execution was interrupted in WordPress database inquiry SELECT wp_posts.
   ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.
   object_id) WHERE 1=1 AND wp_posts.ID NOT IN (168137) AND (
    wp_term_relationships.
   term_taxonomy_id IN (30,31,32,58,762) ) AND wp_posts.post_type = ‘post’ AND (
   wp_posts.post_status = ‘publish’) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date
   DESC LIMIT 0, 3 coming from require(‘wp-blog-header.php’), require_once(‘wp-includes/
   template-loader.php’), include(‘/themes/jarida/single.php’), get_template_part,
   locate_template, load_template, require(‘/themes/jarida/includes/post-related.
   php’), WP_Query->__construct, WP_Query->query, WP_Query->get_posts
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335538)
 * The idea behind the var_dump line was that you would do whatever you did before
   to produce the message in the first post, then immediately before that the page
   should print out the value of $value which may tell us something.
 * Anyway it looks like something else has happened, so the generic debug routine
   is to deactivate all plugins, rename the plugins folded if necessary, then pick
   the default theme. If it works now, put things back one by one and test to try
   to identify the element that’s causing the problem.
 * Ensure your theme is up-to-date.
 *  Thread Starter [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * (@edwardmaxi)
 * [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335539)
 * OK, I’ll try and see what happens, Thank you very much.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘PHP Warning: SimpleXMLElement’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [Edward](https://wordpress.org/support/users/edwardmaxi/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/php-warning-simplexmlelement/#post-7335539)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
