Domanda

There is Neo4J installed on my Ubuntu and I'm running a test code. It's perfectly working when the code runs on terminal such as:

root@ekin-Inspiron-1090:/var/www# php neo.php
home: demolished
name: Arthur Dent

But when it comes to run on browser like localhost/neo.php, it gives fatal error and stops working.

Warning: require(phar://neo4jphp.phar): failed to open stream: operation failed in /var/www/neo.php on line 4 Fatal error: require(): Failed opening required 'phar://neo4jphp.phar' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/neo.php on line 4 

I don't think it's really something with Neo4J or its PHP driver. What should be the reason?

edit: by the way, there are two php.ini files; i think one for apache and one for command line. I checked both of them and phar extension paths are the same. Also there are no include_path settings in both of them.

È stato utile?

Soluzione

It's an authorization error. Apache runs under its own user, so you need to give apache user to access www folder.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top