• Resolved KL

    (@karenecreativeca)


    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)
  • 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

    Best regards.

    Thread Starter KL

    (@karenecreativeca)

    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!!

    Hi,

    Are you in multisite configuration or single worpdress install ?
    OK, in your browser type : https://client.com/sub/. And test again.

    Best regards.

    Thread Starter KL

    (@karenecreativeca)

    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

    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 7 years, 7 months ago by KL.
    • This reply was modified 7 years, 7 months ago by KL. Reason: **link to screenshot
    • This reply was modified 7 years, 7 months ago by KL.

    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/ url but fails with the same url without slash https://client.com/sub.

    Best regards.

    Thread Starter KL

    (@karenecreativeca)

    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

    (@karenecreativeca)

    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.

    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.