IO Php客户端连接问题

IO Php客户端连接问题,php,eclipse,google-chrome,keen-io,Php,Eclipse,Google Chrome,Keen Io,我正在尝试在PHP应用程序中使用keen.io。下面的代码在EclipseIDE中运行良好,但显示了从chrome/firefox重置连接 非常感谢您的帮助 我使用phpunitest断言实例工作正常。试验成功了。该分析事件已在js客户端中验证,运行良好 现在,我尝试从EclipseIDE创建调试概要文件,并运行了它。创建事件和分析事件都成功了 当我尝试使用Chrome/firefox时,没有响应。调试器中的检查显示无法在chrome中加载资源:net::ERR\u CONNECTION\u R

我正在尝试在PHP应用程序中使用keen.io。下面的代码在EclipseIDE中运行良好,但显示了从chrome/firefox重置连接

非常感谢您的帮助

  • 我使用phpunitest断言实例工作正常。试验成功了。该分析事件已在js客户端中验证,运行良好
  • 现在,我尝试从EclipseIDE创建调试概要文件,并运行了它。创建事件和分析事件都成功了
  • 当我尝试使用Chrome/firefox时,没有响应。调试器中的检查显示无法在chrome中加载资源:net::ERR\u CONNECTION\u RESET
  • 环境 PHP版本是5.5.12 WampServer 视窗8 局部应用

    Edit:我通过chrome和eclipse的xdebug插件对其进行了进一步调试,发现代码在以下方法中中断

    /vendor/guzzle/guzzle/src/guzzle/Service/Command/AbstractCommand.php—第330行,其中包含函数“protectedfunction validate()”

    一旦我对此发表评论,一切似乎都很顺利

    这是密码

    <?php
    namespace KeenIO\Tests\Client;
    require_once __DIR__ . '/vendor/autoload.php';
    
    include('/Firebase/TokenException.php');
    include('/Firebase/TokenGenerator.php');
    
    use Firebase\Token\TokenException;
    use Firebase\Token\TokenGenerator;
    use KeenIO\Client\KeenIOClient;
    use Guzzle\Tests\GuzzleTestCase;
    
    class KeenIOClientTest extends GuzzleTestCase
    {
    
        public function testThisMightHaveADb()
        {
            $projectId = "544a8064072719342addb0d5";        
            $readKey = "b2ec296d6a26d7208af256ea28361bfa0bfd8d3ec2989a2650505596bd33251c96293c90a5dc5a0b476211c30f477436a5b6ef58aa59e4e5259ab8faed48f5c0f418d7754920642651ab97a53c213d38a649fb9278f114ddf64592eff78d53f269fffb334ebb093ba88fbdbc851e33fb";
    
    
            $client = KeenIOClient::factory([
                    'projectId' => $projectId,
                    'writeKey'  => $writeKey,
                    'readKey'   => $readKey
            ]);
    
            echo "done";
    
            //Check that the Client is of the right type
            $this->assertInstanceOf('\Guzzle\Service\Client', $client);
            echo "1";
            $this->assertInstanceOf('\KeenIO\Client\KeenIOClient', $client);
            echo "2";
            //Check that the pass config options match the client's config
            $this->assertEquals($projectId, $client->getConfig('projectId'));
            echo "3";
            $this->assertEquals($writeKey, $client->getConfig('writeKey'));
            $this->assertEquals($readKey, $client->getConfig('readKey'));
    
            echo $client->getProjectId();
    
    
            $average = $client->average("temprBugs", ["target_property" => "PF", "timeframe" => "previous_5_days"]);
    
            print_r ($average);
        }
    }
    
    $testObject = new KeenIOClientTest();
    $testObject ->testThisMightHaveADb(); 
    
    ?>
    

    这些是您实际生产的
    $readKey
    $writeKey
    值吗?如果是这样的话,你可能会想要新的,因为现在它们是公开的。你也可以更新你的帖子,为这些变量添加虚拟值。感谢@Castaglia的注释,它们只是虚拟值。