cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

I can't connect neo4j php

hello
I tried to connect to the neo4j database using PHP and I could not do it. what am I doing wrong? Here the error:

Fatal error : Uncaught GraphAware\Bolt\Exception\HandshakeException: Handshake Exception. Unable to negotiate a version to use. Proposed versions were [1,0,0,0] in C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-bolt\src\Driver.php:165 Stack trace: #0 C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-bolt\src\Driver.php(151): GraphAware\Bolt\Driver->throwHandshakeException('Handshake Excep...') #1 C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-bolt\src\Driver.php(115): GraphAware\Bolt\Driver->handshake() #2 C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-php-client\src\Connection\Connection.php(192): GraphAware\Bolt\Driver->session() #3 C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-php-client\src\Connection\Connection.php(109): GraphAware\Neo4j\Client\Connection\Connection->checkSession() #4 C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-php-client\src\Client.php(67): GraphAware\Neo4j\Client\Connection\Connection->run(' CREAT...', NULL, NULL) #5 C:\xampp\htdocs\bisa\pendaftaran\prosesdaftar.php(18): GraphAware\Neo4j\Client\Client in C:\xampp\htdocs\bisa\vendor\graphaware\neo4j-bolt\src\Driver.php on line 165

3 REPLIES 3

I have the same problem, did you find the solution?

I use neo4j desktop version 1.2.4 and it works. but when using neo4j desktop 1.2.9 it doesn't work

<?php require __DIR__ . '/vendor/autoload.php'; use GraphAware\Neo4j\Client\ClientBuilder; // change to your hostname, port, username, password $neo4j_url = "http://neo4j:password@localhost:7474"; //$neo4j_url1 = "bolt://neo4j:password@localhost:7687"; // setup connection $client = ClientBuilder::create() ->addConnection('default', $neo4j_url) //->addConnection('bolt', $neo4j_url1) ->build(); ?>

thank you @evanurafny I solved the problem,I use Neo4j Community server version 4.0.3 but with "composer require neoxygen/neoclient" in My Project file PHP and finally I did connection between php and server neo4j.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online