Graphstory和Neo4jphp

Graphstory和Neo4jphp,neo4j,neo4jphp,Neo4j,Neo4jphp,我已经按照文档中的简单步骤成功地将neo4jphp库与graphenedb结合使用(考虑到graphenedb不需要https) 但是,当尝试连接到一个graphstory实例时(当然,如果我从浏览器调用RESTAPI,它们都可以正常工作,neo4j控制台也可以正常工作等等),它需要https,如下所示 require('vendor/autoload.php'); // or your custom autoloader // Connecting to a different port or

我已经按照文档中的简单步骤成功地将neo4jphp库与graphenedb结合使用(考虑到graphenedb不需要https)

但是,当尝试连接到一个graphstory实例时(当然,如果我从浏览器调用RESTAPI,它们都可以正常工作,neo4j控制台也可以正常工作等等),它需要https,如下所示

require('vendor/autoload.php'); // or your custom autoloader
// Connecting to a different port or host
$client = new Everyman\Neo4j\Client(url, port);
// Connecting using HTTPS and Basic Auth
$client->getTransport()
->useHttps()
->setAuth('username', 'password');
// Test connection to server
print_r($client->getServerInfo());
我得到以下错误。它们应该是一样的,我不明白为什么

Fatal error: Uncaught exception 'Everyman\Neo4j\Exception' with message 'Can't open connection to https://neo-54f500bf2cc7e-364459c455.do-stories.graphstory.com:7473/db/data/' in /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Transport/Curl.php:91 
Stack trace: 
#0 /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Transport.php(95): Everyman\Neo4j\Transport\Curl->makeRequest('GET', '/', NULL) 
#1 /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Command.php(64): Everyman\Neo4j\Transport->get('/', NULL) 
#2 /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Client.php(828): Everyman\Neo4j\Command->execute() 
#3 /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Client.php(464): Everyman\Neo4j\Client->runCommand(Object(Everyman\Neo4j\Command\GetServerInfo)) 
#4 /Applications/XAMPP/xamppfiles/htdocs/graphene/story.php(20): Every in /Applications/XAMPP/xamppfiles/htdocs/graphene/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Transport/Curl.php on line 91

我是Graph Story的首席技术官/首席开发官。很遗憾听到你有麻烦。实际上,我刚刚查看了您的实例,从服务器端看,情况似乎还不错

如果没有其他信息,很难说您的示例连接代码是否存在问题。考虑到您过去曾使用同一个库连接到GrapheneDB,我认为示例代码中出现错误的可能性很低


根据实例的当前状态和Neo4jPHP引发的异常,我猜您的网络上可能会阻塞7473端口。您可以通过本地技术支持或切换到您知道端口7473已打开的网络并尝试再次连接来确认这一点。

在我看来,neo4jphp没有在cURL请求中配置TLS部件

我通过从(ca_bundle.crt)下载证书包并将以下行添加到Everyman\Neo4j\Transport\Curl.php函数makeRequest中修复了它:

$options[CURLOPT_CAINFO] = "your/path/to/ca-bundle.crt";
我在GitHub上为此创建了一个问题:

$options[CURLOPT_CAINFO] = "your/path/to/ca-bundle.crt";