Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Christophe Willemsen
    @ikwattro
    but rather use higher level libraries like http foundation to take care of the request
    now, if you have suggestions, I would be happy to implement them if needed
    Mark Harding
    @markharding
    Having a problem adding a custom command based on documentation. Keep getting an error about RequestBuilder not being defined.. but whyis this being set as default?
    buildRequest() on a non-object after invoke('myalias')
    Christophe Willemsen
    @ikwattro
    can you share some code?
    rahadi
    @rahadi
    hi folks
    im new in neo4j stuffs, could you please tell me where to put these commads to setup a neo4jclient

    <?php

    require_once 'vendor/autoload.php';

    use Neoxygen\NeoClient\ClientBuilder;

    $client = ClientBuilder::create()
    ->addConnection('default','http','localhost',7474)
    ->build();

    Christophe Willemsen
    @ikwattro
    sure in your php files, even index or services
    gic1be
    @gic1be

    Hey guys,
    I'd like to do the tutorial using neo4j-neoclient (https://gist.github.com/ikwattro/833feaed137de238475e).
    Everything works fine until using a query and a result. If I try to add a new user by using parameters like this:

    $query = 'CREATE (user:User {name: {name} }) RETURN user';
    $parameters = array('name' => 'Maxime');
    $client->sendCypherQuery($query);

    There is an "Fatal error: Uncaught exception". I tried to find the reason and I think my version of NeoClient isn't the right one. I tried different versions, but nothing has changed.
    So could you please tell me witch is the newest version? Actually I use "dev-master": "2.1-dev".

    Christophe Willemsen
    @ikwattro
    Hi
    first, you shouldn't use dev releases of neoclient, it has stable versions since a long time
    just use "neoxygen/neoclient": "^2.2" in your composer.json file
    now I suppose there is something else than just Uncaught exception, what is the message of the exception ?
    @gic1be
    gic1be
    @gic1be

    Hi,
    the version is not the problem, I tried it with 2.2 .
    The whole exception is the following message:

    Fatal error: Uncaught exception 'Neoxygen\NeoClient\Exception\Neo4jException' with message 'Neo4j Exception with code "Neo.ClientError.Statement.ParameterMissing" and message "Expected a parameter named name"' in C:...\NeoSocial\src\Extension\AbstractExtension.php:89
    Stack trace:

    #0 C:...\NeoSocial\src\Extension\AbstractExtension.php(76): Neoxygen\NeoClient\Extension\AbstractExtension->checkResponseErrors(Arr

    ay)

    #1 C:...\NeoSocial\src\Extension\NeoClientCoreExtension.php(94): Neoxygen\NeoClient\Extension\AbstractExtension->handleHttpResponse

    (Object(Neoxygen\NeoClient\Request\Response))

    #2 [internal function]: Neoxygen\NeoClient\Extension\NeoClientCoreExtension->sendCypherQuery('CREATE (user:Us...')

    #3 C:...\NeoSocial\src\Extension\ExtensionManager.php(49): call_user_func_array(Array, Array)

    #4 C:...\NeoSocial\src\Client.php(127): Neoxygen\NeoClient\Extension\ExtensionManager->execute('sendCypherQuery', Array)

    #5 C:...\xamp in C:...\NeoSocial\src\Extension\AbstractExtension.php on line 89

    Christophe Willemsen
    @ikwattro
    Ho ok
    I didn't catch it in your code example
    you forgot to pass the parameters as second argument to sendCypherQuery
    gic1be
    @gic1be
    Me neither ;)
    Christophe Willemsen
    @ikwattro
    exactly what says the error :)
    gic1be
    @gic1be

    Maybe I'm blind, but I can't get it.

    This fits:
    $query = 'CREATE (user:User {name:"Maxime"}) RETURN user';
    $result = $client->sendCypherQuery($query)->getResult();

    This not:
    $query = 'CREATE (user:User {name: {name} }) RETURN user';
    $parameters = array('name' => 'Maxime');
    $client->sendCypherQuery($query);

    • What's missing there?
    gic1be
    @gic1be
    ... The parameters, I get it >.<
    So than it would be really nice, if you could update this page (https://gist.github.com/ikwattro/833feaed137de238475e) with both parameters. Maybe there are some other blinds ;) Thanks for help
    Paulo Vitor Bettini de Paiva Lima
    @paulovitorbal
    Is there a way to extend the node and relationship object that is returned by getResult()->getNodes()?
    Christophe Willemsen
    @ikwattro
    not out of the box through configuration
    however you can just create an improved Result class, and use it to override the default one
    if your needs are generic enough, you can make a pr
    Paulo Vitor Bettini de Paiva Lima
    @paulovitorbal
    Thanks Ikwattro.
    Another question, how can I create a node with a label and save it?
    Christophe Willemsen
    @ikwattro
    The client does not provide OGM like features
    we are working on it at GraphAware, but this need some times though
    anteika
    @ANteiKA
    Hello. On the github page (https://github.com/neoxygen/neo4j-neoclient), it is shown the getRoot() can return two 'databases' on the same neo4j instance (localhost:7474), but in 'working with multiple connections' the addConnection() use different neo4j instances. Is it really possible have different databases ? Do I have to use addConnection() on localhost:7474 with different db names to make it work ? thanks.
    Christophe Willemsen
    @ikwattro
    Hi
    getRoot does not return two instances, the neo4j database entry endpoint returns 2 urls, one for the db, one for the management
    you can use as many databases as you want, you'll need, for each db, to make a ->addConnection() during the build with a different alias for each db
    Note that you'll need to configure your different neo4j databases with different http and https ports so they can run together on the same server if it is your case
    generally we use this kind of configuration when working with a cluster without a proxy
    dalip
    @dalip123
    hi i am unable to connect neo4j with php
    plz help
    C. Munisekhar
    @sekharchintamani
    hi
    C. Munisekhar
    @sekharchintamani
    I am able to connect neo4j using php neo4jclient,
    but the problem is after connection i am calling $version = $client->getNeo4jVersion();
    but it is throwing exception like
    Uncaught exception 'Neoxygen\NeoClient\Exception\HttpException' with message 'Error on Connection "default" with message "Client error: GET http://localhost:7474/db/data resulted in a 401 Unauthorized response:\n{\n "errors" : [ {\n "code" : "Neo.ClientError.Security.AuthorizationFailed",\n "message" : "No authorization header (truncated...)\n"' in /usr/local/bin/vendor/neoxygen/neoclient/src/EventListener/HttpRequestEventSubscriber.php:74\nStack trace:\n#0 [internal function]: Neoxygen\NeoClient\EventListener\HttpRequestEventSubscriber->onHttpException(Object(Neoxygen\NeoClient\Event\HttpExceptionEvent), 'neoclient.http...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))\n#1 /usr/local/bin/vendor/symfony/event-dispatcher/EventDispatcher.php(160): call_user_func(Array, Object(Neoxygen\NeoClient\Event\HttpExceptionEvent), 'neoclient.http...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))\n#2 /usr/local/bin/vendor/symfony/event-dispatcher/EventDispatcher. in /usr/local/bin/vendor/neoxygen/neoclient/src/EventListener/HttpRequestEventSubscriber.php on line 74
    can you please help me with what is the problem and how can i send credentials using neo4jclient in php
    Abed Halawi
    @Mulkave
    @sekharchintamani the error you’re seeing means the username/password combination you’ve used to connect to Neo4j is incorrect.
    As it says in the docs when building the client you can pass the username and password as arguments to the addConnection method as such:
    $client = ClientBuilder::create()
        ->addConnection('default', 'http', 'myserver.dev', 7474, true, 'username', 'password')
        ->build();
    iwarrior74
    @iwarrior74
    Is there anyone around?
    gitygh
    @gitygh
    hi. i want creat an app in eclips and connect to neo4j by http protocol. server side is php. i need a simple project for this. Can anyone guide me?
    Christopher Anderson
    @linuxguru4u_twitter
    hello
    can anyone tell me if the neo4j 3.3.4 clustering php is working or is testing and what branch to pull from
    Urvashi Desai
    @desaiu_gitlab
    hey