Title: Error: DOMDocument::loadXML(): Empty string supplied as input in
Last modified: September 23, 2016

---

# Error: DOMDocument::loadXML(): Empty string supplied as input in

 *  Resolved [KL](https://wordpress.org/support/users/karenecreativeca/)
 * (@karenecreativeca)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/)
 * Hi There,
 * I’m trying to connect to a CAS server, and get the following error:
 * DOMDocument::loadXML(): Empty string supplied as input in …/plugins/wp-cassify/
   classes/wp_cassify_plugin.php on line 833
 * I am getting a ticket response in the URL:
 * ?ticket=[ST-1516-EqypmPkPVdJshwxVWHea-cas-url]
 * but no XML content to parse. Am i missing some settings? or is this usually from
   the server I’m trying to authenticate to?

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

 *  Plugin Author [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * (@aaf017)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8215467)
 * Hi,
 * What’s version of CAS protocol used by your CAS server ? (CAS protocol version
   2 or 3)
    Turn CAS protocol version to 2 and test again.
 * Test if you’ve not network or dns resolution problem between CAS Server and your
   WordPress server.
 * Have you try to enable debug feature in plugin admin panel? So, you can dump 
   last response send by CAS server and see if XML response is well-formed.
 * See this topic: [[Resolved] DOM Document : load XML() empty string](https://wordpress.org/support/topic/dom-document-load-xml-empty-string/)
 * Best regards.
 *  Thread Starter [KL](https://wordpress.org/support/users/karenecreativeca/)
 * (@karenecreativeca)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8215583)
 * Hi!
 * I was using CAS 3.0 with an empty string instead of a valid XML response (I’m
   told the server is 3.5)
    If I change my settings in wp-cassify to 2.0 I get the
   following back:
 *     ```
       <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
       	<cas:authenticationFailure code='INVALID_SERVICE'>
       		ticket 'ST-45-5S5VCyYBIfm2hxwC3B9a-cas-server-url' does not match supplied service.  The original service was 'https://client.com/sub' and the supplied service was 'https://client.com/sub/'.
       	</cas:authenticationFailure>
       </cas:serviceResponse>
       ```
   
 * Incidentally, this worked ONE time, and one time only where I got a valid response
   back.
 * Thanks!!
 *  Plugin Author [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * (@aaf017)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8216470)
 * Hi,
 * Are you in multisite configuration or single worpdress install ?
    OK, in your
   browser type : [https://client.com/sub/](https://client.com/sub/). And test again.
 * Best regards.
 *  Thread Starter [KL](https://wordpress.org/support/users/karenecreativeca/)
 * (@karenecreativeca)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8221480)
 * Hi Alain,
 * It’s a single wordpress install.
 * Today:
 * 1. First time I tried to login, success!
    2. Tried to logout using: action=logout.
   php 3. Deleted the CAS user from wordpress users via an admin account (Users:
   delete user) 3. Tried to login: failed (see above) but it created a new userID
   anyway 4. Tried to login again, and was taken to the WordPress login screen, 
   not the SSO login screen. I used my CAS credentials and it authenticated me and
   gave me this on the home page:
 * [Screenshot to Home Page](https://cl.ly/0u3m111w3d1o)
 * So. Is logging out an issue? and should I not be using WP logout? I think we’re
   close here, it’s just being a bit patchy.
 * Thanks so much for your assistance. I appreciate it.
 * Here is the success code:
 *     ```
       <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
       	<cas:authenticationSuccess>
       		<cas:user>[myuserid]</cas:user>
       <cas:attributes>
               <cas:uid>[myuserid]</cas:uid>
       </cas:attributes>
       	</cas:authenticationSuccess>
       </cas:serviceResponse>
       ```
   
    -  This reply was modified 9 years, 8 months ago by [KL](https://wordpress.org/support/users/karenecreativeca/).
    -  This reply was modified 9 years, 8 months ago by [KL](https://wordpress.org/support/users/karenecreativeca/).
      Reason: **link to screenshot
    -  This reply was modified 9 years, 8 months ago by [KL](https://wordpress.org/support/users/karenecreativeca/).
 *  Plugin Author [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * (@aaf017)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8223466)
 * Hi,
 * I can’t reproduce the bug because i’ve not single install only WP Multi-sites
   in prod.
 * But i think, it may be a bug in WP Single install. In single install, sometimes,
   there is a bug to calculate serviceUrl (callback url when you’re authenticated
   by CAS).
 * So i think, it works when you’re using [https://client.com/sub/](https://client.com/sub/)
   url but fails with the same url without slash [https://client.com/sub](https://client.com/sub).
 * Best regards.
 *  Thread Starter [KL](https://wordpress.org/support/users/karenecreativeca/)
 * (@karenecreativeca)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8226361)
 * Ok. I’ll apply the trailingslashit() method to all of my login calls and let 
   you know if that provides some consistency.
 *  Thread Starter [KL](https://wordpress.org/support/users/karenecreativeca/)
 * (@karenecreativeca)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8260515)
 * Thanks for your time and help Alain. Ultimately, I had to go another way: creating
   a custom plugin based on phpCAS, with some inspiration (but no copying) from 
   wp-cassify. In the end, I can have front-end users using SSO and still having
   wp-admin accessible to site administrators, so it works out for the best anyway.
 *  Plugin Author [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * (@aaf017)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8380244)
 * Okay,
 * I think that’s an incompatibility due to your WordPress install but i don’t know
   what. If you’ve found a workarround, i close ticket.
 * Best regards.

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

The topic ‘Error: DOMDocument::loadXML(): Empty string supplied as input in’ is 
closed to new replies.

 * ![](https://ps.w.org/wp-cassify/assets/icon-256x256.png?rev=3112582)
 * [WP Cassify](https://wordpress.org/plugins/wp-cassify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cassify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cassify/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cassify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cassify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cassify/reviews/)

## Tags

 * [cas](https://wordpress.org/support/topic-tag/cas/)
 * [connection](https://wordpress.org/support/topic-tag/connection/)

 * 8 replies
 * 2 participants
 * Last reply from: [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/error-domdocumentloadxml-empty-string-supplied-as-input-in/#post-8380244)
 * Status: resolved