Unable to query local sparql endpoint from mediawiki

51 views
Skip to first unread message

amandine

unread,
Jun 26, 2012, 12:00:49 PM6/26/12
to linke...@googlegroups.com
Hello,

We have a semantic mediawiki linked to a triple store (4store).
The data are mirrored into the triple store, we are able to query directly the triple store via the test query interface or via the sparql endpoint (http://localhost:8081/sparql/?query=select * where { ?s ?o ?p . }LIMIT 10).

But we cannot query the endpoint directly inside the mediawiki (via Linkedwiki template). It's like the endpoint is unreachable.


Do you know what could be the cause of the problem

Best regards
Amandine

For information
The code :

{{#sparql:
select ?s ?p ?o WHERE { ?s ?p ?o.} select * where { ?x ?y ?z . } LIMIT 10
|endpoint=http://localhost:8081/sparql/
}}

return

Error #sparql :Error query  : select ?s ?p ?o WHERE { ?s ?p ?o.} select * where { ?x ?y ?z . } LIMIT 10 Error endpoint: http://localhost:8081/sparql/ Error http_response_code: 400 Error message:

 -------------------------------------------------------------

the code :
{{#sparql:SELECT * WHERE { <PAGEIRI> ?o ?p.} }}

return an empty table

Whe have the same problem with the special page Special:Specialsparqlquery


 -------------------------------------------------------------

Installed version
mediawiki 1.1.9
semantic mediawiki 1.7.1
Linked wiki 2.0.0 alpha 1
4store 1.1.4


Karima Rafes

unread,
Jun 26, 2012, 12:22:40 PM6/26/12
to linke...@googlegroups.com

And with the parameter debug=YES ?
Have you install curl for php5-curl ?

Karima

SAHL Amandine

unread,
Jun 27, 2012, 3:23:39 AM6/27/12
to linke...@googlegroups.com
Hello,

php5-curl is installed

I don't know what is the debug parameter. An apache or a mediawiki parameter?

In the LocalSettings.php we have this following related debug parameters :
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );

Best regards

2012/6/26 Karima Rafes <karima...@gmail.com>

Karima Rafes

unread,
Jun 27, 2012, 4:02:40 AM6/27/12
to linke...@googlegroups.com

Its a parameter of #sparql... |debug = YES

Try with a query on dbpedia. If it works, the problem is not in the wiki.

Karima

On 6 27, 2012 9:23 AM, "SAHL Amandine" <amandi...@gmail.com> wrote:

Hello,

php5-curl is installed

I don't know what is the debug parameter. An apache or a mediawiki parameter?

In the LocalSettings.php we have this following related debug parameters :
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );

Best regards

2012/6/26 Karima Rafes <karima...@gmail.com> > > And with the parameter debug=YES ? > Have you ...

SAHL Amandine

unread,
Jun 27, 2012, 4:26:13 AM6/27/12
to linke...@googlegroups.com
It's working with dbpedia.
Adding the parameter debug=Yes chage nothing. We have the same message.

It's strange that the problem is not the wiki, because the data are mirrored inside the triple store. That mean semantic mediawiki is enable to put data but not to retrive. How it is possible?

For information I check the stored URI and everything look good.


2012/6/27 Karima Rafes <karima...@gmail.com>

Karima Rafes

unread,
Jun 27, 2012, 4:54:36 AM6/27/12
to linke...@googlegroups.com

Sorry, I didn t see it.
You have a error in your query sparql in your first mail.
You have 2 times select.

On 6 27, 2012 10:26 AM, "SAHL Amandine" <amandi...@gmail.com> wrote:

It's working with dbpedia.
Adding the parameter debug=Yes chage nothing. We have the same message.

It's strange that the problem is not the wiki, because the data are mirrored inside the triple store. That mean semantic mediawiki is enable to put data but not to retrive. How it is possible?

For information I check the stored URI and everything look good.

2012/6/27 Karima Rafes <karima...@gmail.com> > > Its a parameter of #sparql... |debug = YES > ...

SAHL Amandine

unread,
Jun 27, 2012, 5:01:57 AM6/27/12
to linke...@googlegroups.com
Effectively sorry, me neither I didn't see it.

But the query  {{#sparql:SELECT * WHERE { <PAGEIRI> ?o ?p.} }}  doesn't not work too.

2012/6/27 Karima Rafes <karima...@gmail.com>

Karima Rafes

unread,
Jun 27, 2012, 5:38:46 AM6/27/12
to linke...@googlegroups.com

The version 2 of linkedwiki can work without semantic mediawiki. So, this query with pageiri can work only with the version 1.
This month, I have a few time to update linkedwiki but i dont know if pageiri is again possible with the new Smw.

Regards
Karima

On 6 27, 2012 11:01 AM, "SAHL Amandine" <amandi...@gmail.com> wrote:

Effectively sorry, me neither I didn't see it.

But the query  {{#sparql:SELECT * WHERE { <PAGEIRI> ?o ?p.} }}  doesn't not work too.

2012/6/27 Karima Rafes <karima...@gmail.com> > > Sorry, I didn t see it. > You have a error in ...

SAHL Amandine

unread,
Jun 27, 2012, 8:13:58 AM6/27/12
to linke...@googlegroups.com
Ok thanks for the aswer.

2012/6/27 Karima Rafes <karima...@gmail.com>
Reply all
Reply to author
Forward
0 new messages