ioanamaria08 0 Report post Posted June 4, 2018 Idea e următoarea: doresc să extrag de pe serverul RDF4J printr-o interogare SPARQL date din graf si sa le afisez intr-o pagina, dar primesc urmatoarea eroare: Uncaught exception 'InvalidArgumentException' with message '$config should be an array and cannot be null. Codul php: <?php require 'vendor/autoload.php'; print"<b>Lista participantilor:</b><br/>"; $adresa="http://localhost:8080/rdf4j-server/repositories/maraton?query="; $interogare=urlencode("prefix gi: <http://vaduvescu.toma.ro#> select ?subiect ?nume where {?subiect gi:hasName ?nume}"); $clienthttp = new EasyRdf_Http_Client($adresa,$interogare); $clienthttp->setHeaders("Accept","application/sparql-results+json"); $rezultatJSON = $clienthttp->request()->getBody(); print "<br/><br/><b>Raspunsul JSON sosit este : </b>".$rezultatJSON; $rezultatRestructurat = new EasyRdf_Sparql_Result($rezultatJSON, "application/sparql-results+json"); print "<br/><br/><b>Raspunsul structurat este: </b>".$rezultatRestructurat; ?> Quote Share this post Link to post Share on other sites
+Portocala 146 Report post Posted June 26, 2018 Nu am habar de RDF si SPARQL, dar eroare iti zice clar ca o variabila $config e nula ( nedeclarata ). Ceea ce ma duce cu gandul la faptul ca iti lipseste un parametru in vre-o functie dar din portiunea de cod ce ai oferito nu te pot ajuta. Din cate vad folosesti ceva framework asa ca iti recomand sa mai treci odata peste documentatia acestuia, daca aceasta exista, daca nu sa te uiti prin codul sursa a framework-ului si sa vezi in care din functile folosite in fisierul prin care ai executat acest script trebuie sa treci variabila $config Edit: De plictisit ce eram nici nu m-am uitat la data in care a fost creat topic-ul Quote https://www.facebook.com/puffysticks/ https://www.instagram.com/puffystickscom/ https://twitter.com/puffysticks Share this post Link to post Share on other sites
+Roberth 10 Report post Posted June 29, 2018 Oricum, nu s-a inchis corect. Tu ai asa: ; CORECT: ;' Quote Center Web - Realizam site-uri web! Share this post Link to post Share on other sites
+Stefan 73 Report post Posted July 3, 2018 On 6/29/2018 at 8:18 PM, Roberth said: Oricum, nu s-a inchis corect. Tu ai asa: ; CORECT: ;' Pune secventa de cod unde te referi Quote Share this post Link to post Share on other sites