Welcome Guest, Not a member yet? Register   Sign In
Composer problem (500 Internal Server)
#1

[eluser]CJL01[/eluser]
I'm trying to add the ElasticSearch PHP client (https://github.com/nervetattoo/elasticsearch) to my CI project using composer. The install went cleanly and I can see the ./vendor directory no problem. I included '/vendor/autoload.php' in my index.php file, but I'm struggling to use the library in my code.

The readme for the package (copied from github) says I should use:

Code:
use \ElasticSearch\Client;
$es = Client::connection('http://127.0.0.1:9200/myindex/mytype');

But the 1st line doesn't seem to make sense as PHP is rejecting the initial slash resulting in a 500 Server Error. Removing it doesn't work either...

Any ideas?


Messages In This Thread
Composer problem (500 Internal Server) - by El Forum - 05-08-2013, 07:00 AM
Composer problem (500 Internal Server) - by El Forum - 05-08-2013, 12:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB