Iv. The result of a failed CAS build always hurts (client) _php Tutorial

Source: Internet
Author: User
=========================================================================================================

Setp4:tomcat and CAS Server binding operation:: Reference: Baidu, Google, search .....

=========================================================================================================

1, the use of urine is a PHP client, urine will only PHP, first from the CAS download site down a PHP version of the client program

Address:http://downloads.jasig.org/cas-clients/php/version of a lot, the basic choice of a back, that is, the latest can!

2, the files extracted to your site root directory, of course, other directories can also, whatever you decide, if there is a file called "cas.php", it proves that you download should be the right package

3. Create a new file "index.php"

 
  PHPinclude_once(' cas.php '); // Introduction of CAS entry file phpcas::setdebug (); // set log:: Log will generate a log file called "PhpCAS.log" in your program directory phpcas::client (cas_version_2_0, ' localhost ', 8443, ' CAS '); // Connection /*  */phpcas::setnocasservervalidation ();p hpcas:: Handlelogoutrequests ( ); // gets whether the server has exited phpcas::forceauthentication (); // Validation if (isset($_request[' logout ')) {    Phpcas::logout ();}? >

4. Open Browser, run:http://127.0.0.1/index.php

If you see this interface, prove that you can log in normally, account | Password login, you will jump back to 127.0.0.1! We're landing.

Login Result:

This time if we on the server directly login: The client does not have to login to see this interface, if the client login, the server will follow the landing!

But now the problem seems to be in the verification above, the single point of landing seems to be successful, but one to the PHP verification phase, will not get through!

Phpcas::forceauthentication (); // error when verifying. The error content is as follows: CAS authentication failed! You were not authenticated. You may submit a your request again by clicking. If The problem persists, the contact the administrator for this site.  1.2.0rc2 Using server https://localhost:8443/cas/(CAS 2.0)

If you know this problem, please give me a message or reply, thank you

http://www.bkjia.com/PHPjc/818149.html www.bkjia.com true http://www.bkjia.com/PHPjc/818149.html techarticle ========================================================================================================= SETP4:TOMCA T binds to the CAS server:: Reference: Baidu, Google 、...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.