Zend_OpenId_Consumer login function freezes - even in code example

I am trying to run a simple OpenId input using the first php-openId (Jain) and then ZendFramework, and in both cases I run into a similar problem. I am using the Zend code example from step 38.2.2 http://framework.zend.com/manual/en/zend.openid.consumer.html .

I see the login page perfectly, but when I enter my openId, this code executes: if (isset ($ _ POST ['openid_action']) && & $ _POST ['openid_action'] == "login" && &! Empty ($ _ POST ['openid_identifier'])) {

    echo "New consumer";
    $consumer = new Zend_OpenId_Consumer();
    echo "Gotim";

    if (!$consumer->login($_POST['openid_identifier'])) {
        $status = "OpenID login failed.";
        echo "Failure";
    }
    echo "Continuing";

The code seems to freeze when the $ consumer-> login function is called. I see the result from the first two echoes, but I never see Failures or Continuations (and without echoes I get a 500-Internal Server error when I try to log in). If I enter an invalid openId, then I will get the correct "OpenID Login Error". error message.

I'm sorry if I'm a jerk here. I am a former programmer who has received support in management, and I'm trying to return to it, but I use a lot of technologies new to me (PHP, OpenID, Zend Framework), and it just isn no point now.

Does anyone have any ideas where to look? I can’t believe that the platform itself is bugged (especially when I had a similar problem with Jain openId). I use fatcow.com for web hosting - not sure if this is important.

+3
3

, , HTTP- OpenID. , :

  • , ?
  • , , ( url_fopen ini). Zend_Http_Client .

, Zend_Http_Client Zend_OpenId_Consumer setHttpClient.

:

  • Zend_Http_Client_Adapter_Socket ( )
  • Zend_Http_Client_Adapter_Proxy
  • Zend_Http_Client_Adapter_Test
  • Zend_Http_Client_Adapter_Curl

- :

 $client = new Zend_Http_Client(null, array(
    'adapter'    => 'Zend_Http_Client_Adapter_Proxy',
    'proxy_host' => 'example.com',
    'proxy_port' => 8000,
    'proxy_user' => 'user',
    'proxy_pass' => 'pass'
));

$consumer = new Zend_OpenId_Consumer();
$consumer->setHttpClient($client);

- , . , curl , .

+1

, , - (x10hosting.com), . , - - Fatcow, . , .

0

500, - . apache, , , /usr/local/apache/logs/error _log /etc/httpd/logs/error_log - . , , . - , .

0

Source: https://habr.com/ru/post/1713550/


All Articles