到的Neo4j我在Neo4j的新的,我嘗試使用neoclient GitHub的 說明如下。我用composer和neo4j 2.2.5安裝了neoclient。 現在我想用PHP使用它。當我嘗試設置了以下連接:無法連接通過
<?php
require_once 'vendor/autoload.php';
use Neoxygen\NeoClient\ClientBuilder;
$client = ClientBuilder::create()
->addConnection('default', 'http', 'localhost', 7474)
->build();
$query = 'CREATE (user:User {name:"Kenneth"}) RETURN user';
$result = $client->sendCypherQuery($query)->getResult();
?>
我得到以下錯誤:
Fatal error: Uncaught exception 'Neoxygen\NeoClient\Exception\HttpException' with message 'Error on Connection "default" with message "Client error response [url] http://localhost:7474/db/data/transaction/commit [status code] 401 [reason phrase] Unauthorized"' in C:\wamp\www\fantapappa\vendor\neoxygen\neoclient\src\EventListener\HttpRequestEventSubscriber.php on line 65
和
Neoxygen\NeoClient\Exception\HttpException: Error on Connection "default" with message "Client error response [url] http://localhost:7474/db/data/transaction/commit [status code] 401 [reason phrase] Unauthorized" in C:\wamp\www\fantapappa\vendor\neoxygen\neoclient\src\EventListener\HttpRequestEventSubscriber.php on line 65
有人可以幫助我嗎?我錯了?
401禁用(發展)AUTH肯定是因爲你沒有提供一個密碼的問題,請接受邁克爾的答案,如果這是解決 –
現在我不能謝謝,但我認爲這是問題。只要我接受邁克爾的回答。謝謝! –