Hi.
I’have tried EOpenID extension and got following error:
PHP Error
Description
Undefined index: HTTPS
Source File
/srv/http/yii/demos/test/protected/components/EOpenID.php(72)
00060: 'contact/email' => 'email',
00061: 'namePerson' => 'fullname',
00062: 'birthDate' => 'dob',
00063: 'person/gender' => 'gender',
00064: 'contact/postalCode/home' => 'postcode',
00065: 'contact/country/home' => 'country',
00066: 'pref/language' => 'language',
00067: 'pref/timezone' => 'timezone',
00068: );
00069:
00070: function __construct()
00071: {
00072: $this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
00073: $this->returnUrl = $this->trustRoot . $_SERVER['REQUEST_URI'];
00074:
00075: if (!function_exists('curl_exec')) {
00076: throw new ErrorException('Curl extension is required.');
00077: }
00078:
00079: $this->data = $_POST + $_GET; # OPs may send data as POST or GET.
00080: }
00081:
00082: public function setIdentity($value){
00083: if (strlen($value = trim($value))) {
00084: if (preg_match('#^xri:/*#i', $value, $m)) {
Stack Trace
#0 /srv/http/yii/demos/test/protected/controllers/SiteController.php(109): EOpenID->__construct()
#1 /srv/http/yii/framework/web/actions/CInlineAction.php(32): SiteController->actionOpenIDLogin()
#2 /srv/http/yii/framework/web/CController.php(300): CInlineAction->run()
#3 /srv/http/yii/framework/web/CController.php(278): SiteController->runAction()
#4 /srv/http/yii/framework/web/CController.php(257): SiteController->runActionWithFilters()
#5 /srv/http/yii/framework/web/CWebApplication.php(324): SiteController->run()
#6 /srv/http/yii/framework/web/CWebApplication.php(121): CWebApplication->runController()
#7 /srv/http/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#8 /srv/http/yii/demos/test/index.php(13): CWebApplication->run()
2010-08-18 21:58:39 Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 PHP/5.3.3 with Suhosin-Patch Yii Framework/1.1.3
I’ve fixed it as:
72 if( isset( $_SERVER['HTTPS'] ) )
73 $this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVE R['HTTP_HOST'];
74 else
75 $this->trustRoot = 'http://' . $_SERVER['HTTP_HOST'];
Could you, please, check if it is correct?
Thanks a lot.