Title: CDN broken &#8211; Call to undefined function simplexml_load_string()
Last modified: April 28, 2018

---

# CDN broken – Call to undefined function simplexml_load_string()

 *  Resolved [TeroSalminen](https://wordpress.org/support/users/terosalminen/)
 * (@terosalminen)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cdn-broken-call-to-undefined-function-simplexml_load_string/)
 * After doing the last W3TC update I cannot upload images/files. Well, I can upload
   them, they do go to my server but W3TC is not handling CDN (Amazon Cloudfront)
   responses correctly for some reason.
 * Uploading test image does go to my server, example: [https://www.rc-thoughts.com/wp-content/uploads/2018/04/cdn_test.png](https://www.rc-thoughts.com/wp-content/uploads/2018/04/cdn_test.png)
   
   it is also uploaded to CDN correctly: [https://cdn.rc-thoughts.com/wp-content/uploads/2018/04/cdn_test.png](https://cdn.rc-thoughts.com/wp-content/uploads/2018/04/cdn_test.png)
 * However, WP shows me an error with the image-name and simple “HTTP error.”
 * Looking at server logs we see what is going on:
 *     ```
       2018/04/28 12:39:47 [error] 2958#2958: *247 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function simplexml_load_string() i
       n /wp-content/plugins/w3-total-cache/lib/S3.php:1895
       Stack trace:
       #0 /wp-content/plugins/w3-total-cache/lib/S3.php(1572): S3::getCloudFrontResponse(Object(S3Request))
       #1 /wp-content/plugins/w3-total-cache/CdnEngine_S3_Cf.php(170): S3::listDistributions()
       #2 /wp-content/plugins/w3-total-cache/CdnEngine_S3_Cf.php(149): W3TC\CdnEngine_S3_Cf->invalidate(Array, Array)
       #3 /wp-content/plugins/w3-total-cache/Cdn_Core.php(267): W3TC\CdnEngine_S3_Cf->purge(Array, Array)
       #4 /wp-content/plugins/w3-total-cache/Cdn_Plugin.php(158): W3TC\Cdn_Core->purge(Array, Array)
       #5 /wp-includes/class-wp-hook.php(288): W3TC\Cdn_Plugin->update_attached_file('/w...')
       #6 /wp-includes/plugin.php(203): WP_Hook->apply_filters('/w...', Array)
       #7 /wp-includes/post.php(335): apply_filters('update_attache" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: www.rc-thoughts.
       com, request: "POST /wp-admin/async-upload.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "www.rc-thoughts.com"
       ```
   
 * Only thing changed on my WP is updated W3TC, purged all caches, updated W3TC’s
   Nginx-config, restarted both PHP 7.1.16-1 and Nginx /1.13.12
 * Since this error also prevent’s me to use the image in post’s this is somewhat
   serious.
 * Any help is appreciated!
    -  This topic was modified 8 years, 1 month ago by [TeroSalminen](https://wordpress.org/support/users/terosalminen/).

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

 *  [Fist Full of Crisco](https://wordpress.org/support/users/fistfullofcrisco/)
 * (@fistfullofcrisco)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cdn-broken-call-to-undefined-function-simplexml_load_string/#post-10228301)
 * Did you enable your **libxml** PHP extension? If you are using cPanel you might
   have to make sure its checked on.
 *  Thread Starter [TeroSalminen](https://wordpress.org/support/users/terosalminen/)
 * (@terosalminen)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cdn-broken-call-to-undefined-function-simplexml_load_string/#post-10228304)
 * It’s enabled and active as before update.
 *  Thread Starter [TeroSalminen](https://wordpress.org/support/users/terosalminen/)
 * (@terosalminen)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cdn-broken-call-to-undefined-function-simplexml_load_string/#post-10228409)
 * I found the root-cause, PHP’s libxml was broken. So no fault whatsoever of W3TC
   🙂
 * Thanks for the support, this is solved!

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

The topic ‘CDN broken – Call to undefined function simplexml_load_string()’ is closed
to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [TeroSalminen](https://wordpress.org/support/users/terosalminen/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/cdn-broken-call-to-undefined-function-simplexml_load_string/#post-10228409)
 * Status: resolved