Page 1 of 1
EOpenID and LightOpenID 0.3?
#1
Posted 28 October 2010 - 06:13 AM
Hi.
I'm just wondering if somebody can update EOpenID to new LightOpenID version 0.3 (Oct 19, 2010), which "removes dependency on curl in favor of php streams, and fixes some bugs".
Thanks a lot.
I'm just wondering if somebody can update EOpenID to new LightOpenID version 0.3 (Oct 19, 2010), which "removes dependency on curl in favor of php streams, and fixes some bugs".
Thanks a lot.
#2
Posted 28 October 2010 - 04:55 PM
You should contact extension author directly, I think. His forum id is listed in the right column at extension page: http://www.yiiframew...ension/eopenid/
#3
Posted 29 October 2010 - 02:09 AM
hi, You can use this piece of code to replace the original request () method:
I have uploaded my full version of LightOpenid as attachment file.
protected function request($url, $method='GET', $params=array()) {
$method = strtoupper($method);
$query = http_build_query($params, '', '&');
$option = array('method' => $method, 'max_redirects' => 5,
'timeout' => 5, 'ignore_errors' => true);
if ($method == 'POST')
$option['content'] = $query;
else {
$url .= ( strpos($url, '?') ? '&' : '?') . $query;
if ($method != 'HEAD')
$option['method'] = 'GET';
}
$context = stream_context_create(array('http' => $option));
$body = @file_get_contents($url, false, $context);
$head = implode("\r\n", $http_response_header);
return $head . "\r\n\r\n" . $body;
}
I have uploaded my full version of LightOpenid as attachment file.
Attached File(s)
-
LightOpenID.php (20.21K)
Number of downloads: 18
#5
Posted 29 October 2010 - 02:16 PM
Thanks man
¿How long would it take for you to understand that you own nothing in this world?
www.ramirezcobos.com
www.ramirezcobos.com
#7
Posted 08 November 2010 - 08:10 AM
CGeorge, on 02 November 2010 - 03:49 AM, said:
Thank you all! Updated
Then I should not get this error
Descripción
Curl extension is required.
Archivo Fuente:
D:\MOI\sp\website\protected\components\EOpenID.php(101)
00089: 'contact/postalCode/home' => 'postcode',
00090: 'contact/country/home' => 'country',
00091: 'pref/language' => 'language',
00092: 'pref/timezone' => 'timezone',
00093: );
00094:
00095: function __construct()
00096: {
00097: $this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
00098: $this->returnUrl = $this->trustRoot . $_SERVER['REQUEST_URI'];
00099:
00100: if (!function_exists('curl_exec')) {
00101: throw new ErrorException('Curl extension is required.');
Am I wrong?
#8
Posted 07 December 2010 - 04:31 AM
i try to use this library, but got errors
first i got error "Undefined index: HTTPS" on line
then i got error
i changed code
to
i see that errors getting only me, i use sample code http://www.yiiframew...on/eopenid/#hh4
why i get errors?
first i got error "Undefined index: HTTPS" on line
$this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];so i changed
$this->trustRoot = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
then i got error
Quote
PHP Error
Description
Trying to get property of non-object
Source File
/home/konst/NetBeansProjects/test_blog/protected/components/EOpenID.php(141)
00129:
00130:
00131: public function getIsAuthenticated(){
00132: return $this->isAuthenticated;
00133: }
00134:
00135: public function getName(){
00136: $info=$this->attributes;
00137: //if (count($info) == 0) return null;
00138: var_dump($info);
00139:
00140: foreach(array('nickname','email','fullname') as $attribute)
00141: if ($info->$attribute)
00142: return $info->$attribute;
00143:
00144: }
00145:
00146: public function getIdentity() {
00147: # We return claimed_id instead of identity,
00148: # because the developer should see the claimed identifier,
00149: # i.e. what he set as identity, not the op-local identifier (which is what we verify)
00150: return $this->claimed_id;
00151: }
00152:
00153: public function getId(){
Stack Trace
#0 /home/konst/NetBeansProjects/yii/framework/web/auth/CWebUser.php(193): EOpenID->getName()
#1 /home/konst/NetBeansProjects/test_blog/protected/controllers/SiteController.php(154): CWebUser->login()
#2 /home/konst/NetBeansProjects/yii/framework/web/actions/CInlineAction.php(57): SiteController->actionOpenIDLogin()
#3 /home/konst/NetBeansProjects/yii/framework/web/CController.php(300): CInlineAction->run()
#4 /home/konst/NetBeansProjects/yii/framework/web/CController.php(278): SiteController->runAction()
#5 /home/konst/NetBeansProjects/yii/framework/web/CController.php(257): SiteController->runActionWithFilters()
#6 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(324): SiteController->run()
#7 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(121): CWebApplication->runController()
#8 /home/konst/NetBeansProjects/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#9 /home/konst/NetBeansProjects/test_blog/index.php(13): CWebApplication->run()
2010-12-07 11:25:41 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.5
Description
Trying to get property of non-object
Source File
/home/konst/NetBeansProjects/test_blog/protected/components/EOpenID.php(141)
00129:
00130:
00131: public function getIsAuthenticated(){
00132: return $this->isAuthenticated;
00133: }
00134:
00135: public function getName(){
00136: $info=$this->attributes;
00137: //if (count($info) == 0) return null;
00138: var_dump($info);
00139:
00140: foreach(array('nickname','email','fullname') as $attribute)
00141: if ($info->$attribute)
00142: return $info->$attribute;
00143:
00144: }
00145:
00146: public function getIdentity() {
00147: # We return claimed_id instead of identity,
00148: # because the developer should see the claimed identifier,
00149: # i.e. what he set as identity, not the op-local identifier (which is what we verify)
00150: return $this->claimed_id;
00151: }
00152:
00153: public function getId(){
Stack Trace
#0 /home/konst/NetBeansProjects/yii/framework/web/auth/CWebUser.php(193): EOpenID->getName()
#1 /home/konst/NetBeansProjects/test_blog/protected/controllers/SiteController.php(154): CWebUser->login()
#2 /home/konst/NetBeansProjects/yii/framework/web/actions/CInlineAction.php(57): SiteController->actionOpenIDLogin()
#3 /home/konst/NetBeansProjects/yii/framework/web/CController.php(300): CInlineAction->run()
#4 /home/konst/NetBeansProjects/yii/framework/web/CController.php(278): SiteController->runAction()
#5 /home/konst/NetBeansProjects/yii/framework/web/CController.php(257): SiteController->runActionWithFilters()
#6 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(324): SiteController->run()
#7 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(121): CWebApplication->runController()
#8 /home/konst/NetBeansProjects/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#9 /home/konst/NetBeansProjects/test_blog/index.php(13): CWebApplication->run()
2010-12-07 11:25:41 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.5
i changed code
if ($info->$attribute)
return $info->$attribute;to
if (isset($info[$attribute]))
return $info[$attribute];i see that errors getting only me, i use sample code http://www.yiiframew...on/eopenid/#hh4
why i get errors?
#9
Posted 13 February 2011 - 12:05 PM
I used your example code and I get exception No server found
.
Share this topic:
Page 1 of 1

Help












