Please check in /var/log/apache/error.log

maybe any wrong happen,

Maybe you have problem with PEAR or SSL

i have succesfull with  version :

   1. *CAS Server*                  : CAS Server 3.4.4 Jasig
   2. *phpCAS *                       : phpCAS 1.0.11-RC



On Fri, Jan 21, 2011 at 3:37 AM, Daniel <[email protected]> wrote:

> Hello, it is me again. I am trying to get phpCAS Client 1.2.0 working.
>
> I am using cas-server-3.4.3 and CAS-1.2.0 (also tried CAS-1.2.0RC2, same
> problem)
>
> I followed the instructions from
> https://wiki.jasig.org/display/CASC/phpCAS and used the simple CAS client
> example but it doesnt work.
>
> When i visit the page "http://localhost/test.php"; i am redirected to the
> Cas Login Page (
> https://localhost:8443/cas/login?service=http%3A%2F%2Flocalhost%2Ftest.php).
> After the login, an empty page is opened with the php-url added with a
> ticket number (
> http://localhost/test.php?ticket=ST-25-yFFK4qG1J5gbxbseQlpW-cas).
>
> The html-part of the test.php is skipped, but the log says my user is
> authenticated.
>
> I tried to send some test-echos to get the error. An echo before the Line
> "phpCAS::forceAuthentication();" is working, after the line it doesnt work.
>
> --------------------------------------------------------------
> /var/www/html/test.php:
> <?php
>
> include_once('/opt/CAS-1.2.0/CAS.php');
> phpCAS::setDebug('/var/log/test.log');
> phpCAS::client(CAS_VERSION_2_0,'localhost',8443,'/cas/');
> phpCAS::setNoCasServerValidation();
>
> echo "test1"; // <---------------------------------------OUTPUT WORKS
>
> phpCAS::forceAuthentication();
>
> echo "test2"; // <---------------------------------------OUTPUT DOESN'T
> WORK
>
> // at this step, the user has been authenticated by the CAS server
> // and the user's login name can be read with phpCAS::getUser().
>
> // logout if desired
> if (isset($_REQUEST['logout'])) {
>        phpCAS::logout();
> }
>
> // for this test, simply print that the authentication was successfull
> ?>
> <html>
>  <head>
>    <title>phpCAS simple client</title>
>  </head>
>  <body>
>    <h1>Successfull Authentication!</h1>
>    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
>    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
>    <p><a href="?logout=">Logout</a></p>
>  </body>
> </html>
> --------------------------------------------------------------
> /var/log/test.log:
> 0409 .START phpCAS-1.2.0 ****************** [CAS.php:471]
> 0409 .=> phpCAS::client('2.0', 'localhost', 8443, '/cas/') [test.php:7]
> 0409 .|    => CASClient::CASClient('2.0', false, 'localhost', 8443,
> '/cas/', true) [CAS.php:374]
> 0409 .|    |    Starting a new session [client.php:680]
> 0409 .|    <= ''
> 0409 .<= ''
> 0409 .=> phpCAS::setNoCasServerValidation() [test.php:9]
> 0409 .<= ''
> 0409 .=> phpCAS::forceAuthentication() [test.php:13]
> 0409 .|    => CASClient::forceAuthentication() [CAS.php:950]
> 0409 .|    |    => CASClient::isAuthenticated() [client.php:952]
> 0409 .|    |    |    => CASClient::wasPreviouslyAuthenticated()
> [client.php:1047]
> 0409 .|    |    |    |    no user found [client.php:1216]
> 0409 .|    |    |    <= false
> 0409 .|    |    |    no ticket found [client.php:1109]
> 0409 .|    |    <= false
> 0409 .|    |    => CASClient::redirectToCas(false) [client.php:961]
> 0409 .|    |    |    => CASClient::getServerLoginURL(false, false)
> [client.php:1232]
> 0409 .|    |    |    |    => CASClient::getURL() [client.php:439]
> 0409 .|    |    |    |    |    Final URI: 
> http://localhost/test.php[client.php:2805]
> 0409 .|    |    |    |    <= 'http://localhost/test.php'
> 0409 .|    |    |    <= '
> https://localhost:8443/cas/login?service=http%3A%2F%2Flocalhost%2Ftest.php
> '
> 0409 .|    |    |    Redirect to :
> https://localhost:8443/cas/login?service=http%3A%2F%2Flocalhost%2Ftest.php[client.php:1234]
> 0409 .|    |    |    exit()
> 0409 .|    |    |    -
> 0409 .|    |    -
> 0409 .|    -
> 2658 .START phpCAS-1.2.0 ****************** [CAS.php:471]
> 2658 .=> phpCAS::client('2.0', 'localhost', 8443, '/cas/') [test.php:7]
> 2658 .|    => CASClient::CASClient('2.0', false, 'localhost', 8443,
> '/cas/', true) [CAS.php:374]
> 2658 .|    |    Starting a new session [client.php:680]
> 2658 .|    |    ST or PT 'ST-27-cho9broI7riOTgE2ncsP-cas' found
> [client.php:766]
> 2658 .|    <= ''
> 2658 .<= ''
> 2658 .=> phpCAS::setNoCasServerValidation() [test.php:9]
> 2658 .<= ''
> 2658 .=> phpCAS::forceAuthentication() [test.php:13]
> 2658 .|    => CASClient::forceAuthentication() [CAS.php:950]
> 2658 .|    |    => CASClient::isAuthenticated() [client.php:952]
> 2658 .|    |    |    => CASClient::wasPreviouslyAuthenticated()
> [client.php:1047]
> 2658 .|    |    |    |    no user found [client.php:1216]
> 2658 .|    |    |    <= false
> 2658 .|    |    |    PT `ST-27-cho9broI7riOTgE2ncsP-cas' is present
> [client.php:1082]
> 2658 .|    |    |    => CASClient::validatePT('', NULL, NULL)
> [client.php:1083]
> 2658 .|    |    |    |     [client.php:2653]
> 2658 .|    |    |    |    => CASClient::getURL() [client.php:550]
> 2658 .|    |    |    |    |    Final URI: 
> http://localhost/test.php[client.php:2805]
> 2658 .|    |    |    |    <= 'http://localhost/test.php'
> 2658 .|    |    |    |    => CAS_CurlRequest::_sendRequest()
> [AbstractRequest.php:188]
> 2658 .|    |    |    |    |    Response Body:
> <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
>        <cas:authenticationSuccess>
>                <cas:user>USERNAME</cas:user>
>
>
>        </cas:authenticationSuccess>
> </cas:serviceResponse>
>
>  [CurlRequest.php:129]
> 2658 .|    |    |    |    <= true
> --------------------------------------------------------------
> url at this moment:
> http://localhost/test.php?ticket=ST-27-cho9broI7riOTgE2ncsP-cas
>
> No html output, only test1 appears in the browser.
>
> Does anybody now a solution?
> Thanks, Daniel
>
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to