How to Execute SPARQL Queries via EasyRdf?

1.1k Views Asked by At

I don't know, how to get a SPARQL query executed on the Virtuoso server via EasyRdf.

Virtuoso is started via

virtuoso\bin\virtuoso-t +service create +instance VirtuosoService

and I can go to http://localhost:8890/conductor on my web browser. In the tab Linked Data/Graphs there is a list of graphs:

The latest is the graph wich I want to query and was created by uploading the file http://njh.me/foaf.rdf via Quad Store Upload.

Now comes the PHP part. What is the right way to execute a query via EasyRdf? The following code

$graph = new \EasyRdf_Graph('http://localhost:8890/foaf');
$numTriples = $graph->load();

throws this exception: HTTP request for http://localhost:8890/foaf failed: File not found

I also tested with

  • http://localhost:8890/foaf/sparql: HTTP request for http://localhost:8890/foaf/sparql failed: File not found
  • http://localhost:1111/foaf/sparql: Failed to parse HTTP response.
  • http://localhost:1111/foaf: Notice: fwrite(): send of 375 bytes failed with errno=10054 An existing connection was closed by the remotehost
1

There are 1 best solutions below

0
On