neo4j - No Relationship class found in neo4jphp when using neo4jphp.phar -


when running neo4jphp/neo4jphp.phar on local machine, seems noe4j - 1.9.rc2 works correctly. also, web interface available.

when runnning command (below)

$arthuroutgoingrelationships = $arthur->getrelationships(array(),     relationship::directionout); 

, having

php fatal error:  class 'relationship' not found in /var/www/index.php 

in apache error log. downloaded latest available version of neo4jphp registered autoloader:

spl_autoload_register(function ($classname) {   $libpath = '/var/www/neo4jphp/lib/';   $classfile = str_replace('\\',directory_separator,$classname).'.php';   $classpath = $libpath.$classfile;   if (file_exists($classpath)) {      require($classpath);   } }); 

you can work around downloading library github, copy everyman folder subfolders in root directory , use need. in example

    require("phar://neo4jphp.phar");     use everyman\neo4j\relationship; 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -