Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port repeating himself on localhost (with custom port) #124

Open
PulsarFox opened this issue Jan 23, 2019 · 2 comments
Open

Port repeating himself on localhost (with custom port) #124

PulsarFox opened this issue Jan 23, 2019 · 2 comments
Labels
bug waiting for feedback Waiting for essential feedback of one of the parties in the conversation.

Comments

@PulsarFox
Copy link

PulsarFox commented Jan 23, 2019

I've launched a Symfony project, and I use the built in webserver which launches me a server hosted on http://localhost:8000.

When I try to work with SPARQLScript, I've noticed some weird value in the BASE field on the SparlScript array : the port is repeated twice, that gives me BASE : http://localhost:8000:8000/api/user/new

The problems comes from the function getRequestUri() on the ARC2.php file as the $_SERVER['SERVER_NAME'] value gives me "http://localhost:8000/api/user/new" and my variable $_SERVER['SERVER_PORT'] is of course 8000.

Unfortunately I don't have time to fix it myself

EDIT: The same thing happens in the function getScriptURI()

@k00ni k00ni added the bug label Jan 24, 2019
@PulsarFox
Copy link
Author

PulsarFox commented Jan 24, 2019

The thing is the SparqlScript gives me no output, never. here's what the SPARQLScriptPreprocessor variable gives me after a call to processScript()

EDIT: The request is send to the remote endpoint (Jena) and is successful, but I can't manage to find where the result is.

ARC2_SPARQLScriptProcessor Object
(
    [db_object:protected] => 
    [a] => Array
        (
            [sparqlscript_default_endpoint] => http://localhost:3030/SemappsTests/update
            [sparqlscript_max_operations] => 100
            [sparqlscript_max_queries] => 10
        )

    [caller] => stdClass Object
        (
        )

    [inc_path] => /home/foxy/Documents/Sites/Semapps/SemappsV2-Back/vendor/semsol/arc2/
    [ns_count] => 0
    [nsp] => Array
        (
            [http://www.w3.org/1999/02/22-rdf-syntax-ns#] => rdf
        )

    [used_ns] => Array
        (
            [0] => http://www.w3.org/1999/02/22-rdf-syntax-ns#
        )

    [ns] => Array
        (
            [rdf] => http://www.w3.org/1999/02/22-rdf-syntax-ns#
        )

    [base] => http://127.0.0.1:8000/api/user/new
    [errors] => Array
        (
        )

    [warnings] => Array
        (
        )

    [adjust_utf8] => 0
    [max_errors] => 25
    [has_pcre_unicode] => 1
    [max_operations] => 100
    [max_queries] => 10
    [return] => 0
    [script_hash] => 2223019922
    [env] => Array
        (
            [endpoint] => http://localhost:3030/SemappsTests/sparql
            [vars] => Array
                (
                )

            [output] => 
            [operation_count] => 2
            [query_count] => 1
            [query_log] => Array
                (
                    [0] => (http://localhost:3030/SemappsTests/sparql) BASE <http://127.0.0.1:8000/index.php>

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name {
            GRAPH <http://localhost:3030/SemappsTests/data/Users> {
                ?person foaf:name ?name
            }
        }
                )

        )

)

@k00ni
Copy link
Collaborator

k00ni commented Jan 24, 2019

Hi @PulsarFox, i am not familiar with ARC2 "webserver". Maybe @semsol has an idea?

@k00ni k00ni added the waiting for feedback Waiting for essential feedback of one of the parties in the conversation. label Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug waiting for feedback Waiting for essential feedback of one of the parties in the conversation.
Projects
None yet
Development

No branches or pull requests

2 participants