Hi,
After enter my authentication details in ExternalAuthentication example, I get
Warning: fopen(https://na1r.services.adobe.com/account/wsapi/auth/v1) [function.fopen]: failed to open stream in C:\xampp\htdocs\php\lccs.php on line 788
Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\php\lccs.php on line 788
Any hints would be greatly appreciated.
Thanks-
Views
Replies
Total Likes
Are you using the correct room url and authentication token ? Can you
send us the php code snippet that does the authentication part ?
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi,Hironmay
I also try to use php console to login,but still the same problem
Here is my codesnippet.
<?php
require_once("lccs.php");
$title = "LCCS External Authentication Sample";
#
# Enter your authentication details below:
#
$account = "************";
$room = "*******";
$devuser = "***************";
$devpass = "*******";
$secret = "a7e4837ebd054e5c9775eb2b01cfd0db";
$host = "https://collaboration.adobelivecycle.com";
$accountURL = "{$host}/{$account}";
$roomURL = "{$accountURL}/{$room}";
session_start();
if (isset($_REQUEST["user"])) {
$user = $_REQUEST["user"];
$role = (int) $_REQUEST["role"];
if (isset($_SESSION["XSESSION"])) {
$session = $_SESSION["XSESSION"];
} else {
$am = new RTCAccount($accountURL);
$am->login($devuser, $devpass);
$session = $am->getSession($room);
$_SESSION["XSESSION"] = $session;
}
$token = $session->getAuthenticationToken($secret, $user, $user, $role);
} else {
$user = "bob";
$role = 100;
}
function select($r) {
global $role;
return ($role == $r) ? "selected" : "";
}
?>
<html>
<head>
<title><?php echo $title ?></title>
<script type="text/javascript">
function loaded() {
<?php
if (isset($token)) {
?>
win = window.open(
'Flexternal.html?roomURL=<?php echo urlencode($roomURL) ?>&authToken=<?php echo urlencode($token) ?>',
'_blank',
'left=20,top=20,width=800,height=600,toolbar=1,resizable=1');
<?php
}
?>
}
</script>
</head>
<body onload="loaded()">
<h2><?php echo $title ?></h2>
<h4>Connecting to room <?php echo $roomURL ?></h4>
<form method="POST">
<b>User Name</b>
<input type="text" name="user" value='<?php echo $user ?>'>
<b>User Role</b>
<select name="role">
<option value="100" <?php echo select(100) ?>>100 - Owner</option>
<option value="50" <?php echo select(50) ?>>50 - Publisher</option>
<option value="5" <?php echo select(5) ?>>5 - Guest</option>
<option value="0" <?php echo select(0) ?>>0 - None</option>
</select>
<input type="submit" value="Enter Room"></td>
</form>
</body>
</html>
Views
Replies
Total Likes
Hi Hironmay
here is the console output
C:\xampp\php>php c:\xampp\htdocs\php\lccs.php --debug --host=https://collaborati
on.adobelivecycle.com ******* *********@gmail.com ********
$Revision: #3 $ - $Date: 2010/12/01 $
http_get: https://collaboration.adobelivecycle.com/**********?mode=xml&accoun
tonly=true&
Array
(
[0] => HTTP/1.1 302 Moved Temporarily
[1] => Server: Apache-Coyote/1.1
[2] => X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_
GA date=200707131605)/Tomcat-5.5
[3] => Expires: Tue, 04 Jan 2011 02:04:36 GMT
[4] => Cache-Control: max-age=30
[5] => Set-Cookie: Whitcomb-Ident=liangmeinjust:na2-sdk-dfaafb0b-1eaa-4f08-8
36b-bac3ca2b49c2; Domain=collaboration.adobelivecycle.com; Path=/liangmeinjust
[6] => Location: https://na2.collaboration.adobelivecycle.com/liangmeinjust?
mode=xml&accountonly=true&
[7] => Content-Language: en-US
[8] => Content-Length: 0
[9] => Date: Tue, 04 Jan 2011 02:04:06 GMT
[10] => Connection: close
[11] => HTTP/1.1 200 OK
[12] => Server: Apache-Coyote/1.1
[13] => Set-Cookie: JSESSIONID=4WikmeXohSTG4bW8sq7M.5; Path=/
[14] => Cache-Control: max-age=0
[15] => Content-Type: text/xml;charset=UTF-8
[16] => Content-Length: 190
[17] => Date: Tue, 04 Jan 2011 02:04:08 GMT
[18] => Connection: close
)
<result code="unauthorized">
<baseURL href="https://na2.collaboration.adobelivecycle.com:443/"/>
<authentication href="https://na1r.services.adobe.com/account/wsapi/auth/v1"/>
</result>
http_post: https://na1r.services.adobe.com/account/wsapi/auth/v1 <request><usern
ame>**********@gmail.com</username><password>*********</password></request>
Array
(
[Content-Type] => text/xml
)
Warning: fopen(https://na1r.services.adobe.com/account/wsapi/auth/v1): failed to
open stream: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失
败。
in C:\xampp\htdocs\php\lccs.php on line 788
Error: exception 'RTCError' with message 'connection-failed' in C:\xampp\htdocs\
php\lccs.php:793
Stack trace:
#0 C:\xampp\htdocs\php\lccs.php(82): RTC::http_post('https://na1r.se...', '<requ
est><usern...', Array)
#1 C:\xampp\htdocs\php\lccs.php(259): RTCAuthenticator->login('**********@g..
.', 'Adobe123', Array)
#2 C:\xampp\htdocs\php\lccs.php(956): RTCAccount->login('************@g...', '**********')
#3 {main}
Views
Replies
Total Likes
Thanks Hironmay
I fixed it
Some country's "Great Firewall" do this
When I use amazon ec2 php console to login, everything works ok.
Views
Replies
Total Likes