Channel #semsol: Logs

This is a public chat log generated from the #semsol IRC channel.

09:10:15 Anchakor: bengee: shouldn't 'DELETE { ?s ?p ?o }' delete all triples in the store?
09:10:26 Anchakor: bengee: can you explain how $store->insert($doc, $g) works? $store->insert('file.ttl', '<main>') on empty store doesn't work, though from what I understood it should
09:11:19 bengee: you may need DELETE {?s ?p ?o} WHERE {?s ?p ?o}
09:12:17 bengee: and $store->insert($actual_doc, "http://...")
09:13:07 Anchakor: bengee: so the $astual_doc part I got right?
09:13:12 bengee: no
09:13:19 bengee: a doc, not a filename
09:13:29 Anchakor: so a file pointer?
09:13:34 bengee: doc can be an ARC structure, or a string
09:13:44 Anchakor: aah
09:13:49 bengee: rdf/xml, or turtle etc
09:14:13 Anchakor: I tried arc structure but that didnt work - because of the graph I suppose
09:14:39 Anchakor: the graph: what if I need this relatively to my script - it isn't fixed uri thing
09:15:10 bengee: it'll always be stored as absolute URI
09:17:08 Anchakor: anyway I am quite confused what URIs should I use for my graph names... it is just a script... for normal uris in the graphs I use <#somthing> (if it's not defined in any voc) I hope that's right
09:17:40 bengee: yep, that should work
09:18:27 Anchakor: so can I somehow pass relative graph uri to insert()?
09:18:40 bengee: not sure
09:20:23 bengee: how does it store the quads when you just use "something"? I'm not sure if insert() auto-generates a full uri
09:20:55 Anchakor: what about using 'http://this/graphname'? the uri is only used internaly by arc or not so it should be ok, or not?
09:21:30 Anchakor: (wondering if the uri must make sense)
09:21:48 bengee: you can always check what ends up in the store by doing a query("SELECT * WHERE {GRAPH ?g {?s ?p ?o}}")
09:22:12 bengee: arc doesn't really care if graph (or other) URIs make sense
09:22:21 bengee: you can also use urn:
09:22:51 bengee: or make up your own protocol local:myapp:foo
09:23:44 Anchakor: ok, I better use that I think
15:16:04 Anchakor: bengee: I am having problems with LOADing graphs... error: | ['0'] = String(131) "Socket error: Could not connect to "http://www.w3.org/2000/01/rdf-schema" (proxy: 0) in ARC2_Reader via ARC2_StoreLoadQueryHandler"
15:16:08 Anchakor: | ['1'] = String(76) "missing stream in "getFormat" via ARC2_Reader via ARC2_StoreLoadQueryHandler"
15:16:11 Anchakor: | ['2'] = String(95) "No loader available for "http://www.w3.org/2000/01/rdf-schema#": in ARC2_StoreLoadQueryHandler"
15:16:17 Anchakor: bengee: any idea what this might be?
15:16:46 bengee: the http connection failed
15:19:14 Anchakor: any idea what setup normally should work?
15:19:36 bengee: arc uses fsockopen
15:21:05 bengee: can you do fsockopen("www.w3.org", 80); w/o problems?
15:22:08 Anchakor: Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? (0)
15:22:21 Anchakor: ok, will look into my php config
15:22:22 bengee: ah
15:24:40 bengee: wondering if that is another php5 thing
15:26:03 bengee: you didn't have the "http" in the first parameter of fsockopen, did you?
15:27:59 Anchakor: yes
15:28:19 Anchakor: trying http://www.w3.org/2002/07/owl#
15:28:58 bengee: the 1st fsockopen argument should be just "w3.org" (or "www.w3.org"), i.e. no protocol
15:30:15 Anchakor: hm, then I get php_network_getaddresses: getaddrinfo failed: Name or service not known
15:31:07 bengee: ah, maybe the system can't resolve the domain name, then
15:35:12 Anchakor: hmm I have no idea how to fix this
15:39:13 bengee: seems related: http://bugs.php.net/bug.php?id=11058
15:40:27 Anchakor: that is almost 8 years old... Im sure someone would fix it by now if it was a bug
15:40:53 bengee: which php version are you using?
15:41:41 bengee: or RH9 perhaps?
15:42:10 Anchakor: 5.2.9
15:42:32 bengee: then it's probably some OS configuration thing
15:53:06 Anchakor: bengee: I was advised to use http://cz2.php.net/manual/en/function.file-get-contents.php instead of fsockopen
15:54:27 bengee: ok, for arc you'll need fsockopen, though
15:55:23 Anchakor: why is fsockopen necessary?
15:55:49 bengee: it supports post, and gives access to http headers
15:56:04 bengee: and streaming
16:08:29 Anchakor: did testing with similar code what arc uses: http://codepad.org/q993fKod weird
16:12:37 bengee: odd indeed
16:13:19 Anchakor: bengee: could you please paste what you have in "Registered Stream Socket Transports" field in phpinfo()?
16:15:40 bengee: tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
16:15:50 bengee: but tcp should be sufficient
16:16:11 Anchakor: mine is same
16:16:29 bengee: php 5.2.5 here
16:22:05 Anchakor: bengee: $s = @fsockopen($parts['host'], 80); #ojirio $parts['port']);
16:22:49 Anchakor: bengee: this is what I changed ARC2_Reader.php line 170 to and it works
16:23:49 bengee: oh, cool. then it'll be fixable
16:24:25 bengee: could you paste a print_r($parts)
16:24:46 bengee: the system should auto-set the port to 80 if it's empty
16:25:06 Anchakor: Array ( [scheme] => http [host] => www.w3.org [path] => /2002/07/owl [port] => 80 ) Array ( [scheme] => http [host] => www.w3.org [path] => /2000/01/rdf-schema [port] => 80 )
16:25:47 bengee: hm, that makes no senses, then
16:25:53 Anchakor: gtg now, will be here at night maybe, tomorrow a bit and at night
16:26:02 Anchakor: yeah it does not, weird
17:33:11 Anchakor: bengee: ARC is fine, no need for changes... the bug was somewhere in my configuration of php
17:33:26 bengee: phew, good
17:33:40 Anchakor: bengee: might have been that I had short tags turned off
17:34:07 bengee: let's hope it stays away. non-reproduceable bugs are even worse than fix ones