question about http server
Monday, 6 June 2016 · 20 messages · last reply 20 Jun 2016
MK
Mohamed kharrat6 Jun 2016 17:23 #
Hi,
i have setted my pc as server over TinyWeb
i have everything ok.
i opened in my pc 8984 port.
if i execute my php file containing xquery query locally, it works but if i execute it remotely over the ip and port, it show me this message: can't communicate with server.
Anyone have an idea about that?
Thanks
CG
Christian Grün7 Jun 2016 12:07 #
Hi Mohamed,
This sounds like a general port issue, it’s probably not strictly related to BaseX. Did you check your firewall?
Regards,
Christian
Quoted text · Mohamed kharrat · 13 lines
On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Hi, > i have setted my pc as server over TinyWeb > i have everything ok. > i opened in my pc 8984 port. > if i execute my php file containing xquery query locally, it works but > if i execute it remotely over the ip and port, it show me this message: > can't communicate with server. > > Anyone have an idea about that? > > Thanks >
MK
Mohamed kharrat7 Jun 2016 18:27 #
Can you please try this 2 adress and tell me what you get?
http://197.0.28.226:8984
and http://197.0.28.226:80
Thanks
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 11h07
Objet : Re: [basex-talk] question about http server
Hi Mohamed,
This sounds like a general port issue, it’s probably not strictly related to BaseX. Did you check your firewall?
Regards,
Christian
Quoted text · Mohamed kharrat · 13 lines
On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Hi, > i have setted my pc as server over TinyWeb > i have everything ok. > i opened in my pc 8984 port. > if i execute my php file containing xquery query locally, it works but > if i execute it remotely over the ip and port, it show me this message: > can't communicate with server. > > Anyone have an idea about that? > > Thanks >
CG
Christian Grün7 Jun 2016 18:39 #
It both works for me.
A little hint: Better try to avoid posting private URLs to the list.
Quoted text · Mohamed kharrat · 42 lines
On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984 > > and > http://197.0.28.226:80 > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
MK
Mohamed kharrat7 Jun 2016 18:47 #
can you please now see in attachement the php file containing the connexion of baseX ?it do not work for me, it show me (cannot communicate with server)
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h39
Objet : Re: [basex-talk] question about http server
It both works for me.
A little hint: Better try to avoid posting private URLs to the list.
Quoted text · Mohamed kharrat · 42 lines
On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984 > > and > http://197.0.28.226:80 > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
LV
Lizzi, Vincent7 Jun 2016 23:05 #
One hint on your PHP code SemantiqFn: variables file and relation are being concatenated into the query string by PHP. Instead you can bind variables, which is safer in case the data contains a quote which would break your concatenation. Declare the variables at the top of each query:
declare variable $file external;
declare variable $relation external;then in your PHP pass these variables to the query using the bind method.
Vincent
Quoted text · basex-talk-bounces at mailman.uni-konstanz.de · 56 lines
From: basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] On Behalf Of Mohamed kharrat Sent: Tuesday, June 07, 2016 12:48 PM To: Christian Grün <christian.gruen at gmail.com> Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] question about http server can you please now see in attachement the php file containing the connexion of baseX ? it do not work for me, it show me (cannot communicate with server) De : Christian Grün <christian.gruen at gmail.com<mailto:christian.gruen at gmail.com>> À : Mohamed kharrat <med_khr at yahoo.fr<mailto:med_khr at yahoo.fr>> Cc : "basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>" <basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>> Envoyé le : Mardi 7 juin 2016 17h39 Objet : Re: [basex-talk] question about http server It both works for me. A little hint: Better try to avoid posting private URLs to the list. On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr<mailto:med_khr at yahoo.fr>> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984<http://197.0.28.226:8984/> > > and > http://197.0.28.226:80<http://197.0.28.226/> > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com<mailto:christian.gruen at gmail.com>> > À : Mohamed kharrat <med_khr at yahoo.fr<mailto:med_khr at yahoo.fr>> > Cc : "basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>" > <basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr<mailto:med_khr at yahoo.fr>> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
MK
Mohamed kharrat7 Jun 2016 23:44 #
Thank you but even i will change that, i will have the same error: "cann't communicate with server".
Note that:
In my distant server (http://www.works.tn/works.tn/user1/fnxquerybasex/SemantiqFn.php)
it shows me the error but if i execute the same file in local pc, it works fine without problem.
I'm using php page which will be executed on apache server. I dont want send the xquery query in the adress bar of the browser. the queried xml file and the php client are located at www.works.tn server of course. and i'm connecting using the php file to another server: http://197.0.28.226:8984
which contain the BaseX to execute the xquery query.
De : "Lizzi, Vincent" <Vincent.Lizzi at taylorandfrancis.com> À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 22h05
Objet : RE: [basex-talk] question about http server
One hint on your PHP code SemantiqFn: variables file and relation are being concatenated into the query string by PHP. Instead you can bind variables, which is safer in case the data contains a quote which would break your concatenation. Declare the variables at the top of each query:
declare variable $file external;
declare variable $relation external;then in your PHP pass these variables to the query using the bind method.
Vincent
Quoted text · basex-talk-bounces at mailman.uni-konstanz.de · 57 lines
From: basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] On Behalf Of Mohamed kharrat Sent: Tuesday, June 07, 2016 12:48 PM To: Christian Grün <christian.gruen at gmail.com> Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] question about http server can you please now see in attachement the php file containing the connexion of baseX ? it do not work for me, it show me (cannot communicate with server) De : Christian Grün <christian.gruen at gmail.com> À : Mohamed kharrat <med_khr at yahoo.fr> Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h39 Objet : Re: [basex-talk] question about http server It both works for me. A little hint: Better try to avoid posting private URLs to the list. On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984 > > and > http://197.0.28.226:80 > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
MK
Anyone can please try to execute the file remotely?
De : Mohamed kharrat <med_khr at yahoo.fr>
À : Christian Grün <christian.gruen at gmail.com>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h47
Objet : Re: [basex-talk] question about http server
can you please now see in attachement the php file containing the connexion of baseX ?it do not work for me, it show me (cannot communicate with server)
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h39
Objet : Re: [basex-talk] question about http server
It both works for me.
A little hint: Better try to avoid posting private URLs to the list.
Quoted text · Mohamed kharrat · 42 lines
On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984 > > and > http://197.0.28.226:80 > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
CG
Christian Grün15 Jun 2016 07:28 #
Are you sure that your code works locally? You seem to address the BaseX server with the HTTP address (8984), and you should probably use 1984.
Quoted text · Mohamed kharrat · 78 lines
Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: > Anyone can please try to execute the file remotely? > > ------------------------------ > *De :* Mohamed kharrat <med_khr at yahoo.fr> > *À :* Christian Grün <christian.gruen at gmail.com> > *Cc :* "basex-talk at mailman.uni-konstanz.de" < > basex-talk at mailman.uni-konstanz.de> > *Envoyé le :* Mardi 7 juin 2016 17h47 > *Objet :* Re: [basex-talk] question about http server > > can you please now see in attachement the php file containing the > connexion of baseX ? > it do not work for me, it show me (cannot communicate with server) > > > > ------------------------------ > *De :* Christian Grün <christian.gruen at gmail.com> > *À :* Mohamed kharrat <med_khr at yahoo.fr> > *Cc :* "basex-talk at mailman.uni-konstanz.de" < > basex-talk at mailman.uni-konstanz.de> > *Envoyé le :* Mardi 7 juin 2016 17h39 > *Objet :* Re: [basex-talk] question about http server > > It both works for me. > > A little hint: Better try to avoid posting private URLs to the list. > > > On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > > Can you please try this 2 adress and tell me what you get? > > > > http://197.0.28.226:8984 > > > > and > > http://197.0.28.226:80 <http://197.0.28.226/> > > > > Thanks > > > > ________________________________ > > De : Christian Grün <christian.gruen at gmail.com> > > À : Mohamed kharrat <med_khr at yahoo.fr> > > Cc : "basex-talk at mailman.uni-konstanz.de" > > <basex-talk at mailman.uni-konstanz.de> > > Envoyé le : Mardi 7 juin 2016 11h07 > > Objet : Re: [basex-talk] question about http server > > > > Hi Mohamed, > > > > This sounds like a general port issue, it’s probably not strictly > > related to BaseX. Did you check your firewall? > > > > Regards, > > Christian > > > > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> > wrote: > >> Hi, > >> i have setted my pc as server over TinyWeb > >> i have everything ok. > >> i opened in my pc 8984 port. > >> if i execute my php file containing xquery query locally, it works but > >> if i execute it remotely over the ip and port, it show me this message: > >> can't communicate with server. > >> > >> Anyone have an idea about that? > >> > >> Thanks > >> > > > > > > > > >
MK
Mohamed kharrat15 Jun 2016 09:45 #
in the actual script, it's configured at 8984 port for remote testing.But i have used 1984 port when i have tested locally, it's working of course.What i'm looking for is the test remotely
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : BaseX <basex-talk at mailman.uni-konstanz.de>
Envoyé le : Mercredi 15 juin 2016 6h28
Objet : Re: [basex-talk] question about http server
Are you sure that your code works locally? You seem to address the BaseX server with the HTTP address (8984), and you should probably use 1984.
Quoted text · Christian Grün · 1 line
Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>:
Anyone can please try to execute the file remotely?
De : Mohamed kharrat <med_khr at yahoo.fr>
À : Christian Grün <christian.gruen at gmail.com>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h47
Objet : Re: [basex-talk] question about http server
can you please now see in attachement the php file containing the connexion of baseX ?it do not work for me, it show me (cannot communicate with server)
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Envoyé le : Mardi 7 juin 2016 17h39
Objet : Re: [basex-talk] question about http server
It both works for me.
A little hint: Better try to avoid posting private URLs to the list.
Quoted text · Mohamed kharrat · 42 lines
On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Can you please try this 2 adress and tell me what you get? > > http://197.0.28.226:8984 > > and > http://197.0.28.226:80 > > Thanks > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 11h07 > Objet : Re: [basex-talk] question about http server > > Hi Mohamed, > > This sounds like a general port issue, it’s probably not strictly > related to BaseX. Did you check your firewall? > > Regards, > Christian > > > On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi, >> i have setted my pc as server over TinyWeb >> i have everything ok. >> i opened in my pc 8984 port. >> if i execute my php file containing xquery query locally, it works but >> if i execute it remotely over the ip and port, it show me this message: >> can't communicate with server. >> >> Anyone have an idea about that? >> >> Thanks >> > >
CG
Christian Grün15 Jun 2016 09:49 #
You need to use 8984 for the HTTP Server and 1984 for the database server. – Please find some more details in our documentation, I hope this gives you some more insight.
Quoted text · Mohamed kharrat · 96 lines
On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > in the actual script, it's configured at 8984 port for remote testing. > But i have used 1984 port when i have tested locally, it's working of > course. > What i'm looking for is the test remotely > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 6h28 > > Objet : Re: [basex-talk] question about http server > > Are you sure that your code works locally? You seem to address the BaseX > server with the HTTP address (8984), and you should probably use 1984. > Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: > > Anyone can please try to execute the file remotely? > > ________________________________ > De : Mohamed kharrat <med_khr at yahoo.fr> > À : Christian Grün <christian.gruen at gmail.com> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 17h47 > Objet : Re: [basex-talk] question about http server > > can you please now see in attachement the php file containing the connexion > of baseX ? > it do not work for me, it show me (cannot communicate with server) > > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 17h39 > Objet : Re: [basex-talk] question about http server > > It both works for me. > > A little hint: Better try to avoid posting private URLs to the list. > > > On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Can you please try this 2 adress and tell me what you get? >> >> http://197.0.28.226:8984 >> >> and >> http://197.0.28.226:80 >> >> Thanks >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 11h07 >> Objet : Re: [basex-talk] question about http server >> >> Hi Mohamed, >> >> This sounds like a general port issue, it’s probably not strictly >> related to BaseX. Did you check your firewall? >> >> Regards, >> Christian >> >> >> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> Hi, >>> i have setted my pc as server over TinyWeb >>> i have everything ok. >>> i opened in my pc 8984 port. >>> if i execute my php file containing xquery query locally, it works but >>> if i execute it remotely over the ip and port, it show me this message: >>> can't communicate with server. >>> >>> Anyone have an idea about that? >>> >>> Thanks >>> >> >> > > > > > >
MK
Mohamed kharrat15 Jun 2016 10:43 #
Like i said before,I'm already using this port (8984) for HTTP server.but i don't understand how to use both of them in the same time.in the php script i have to write this ? : $session = new Session("localhost", 1984, "admin", "admin");
despite i'm running HTTP server on 8984 HTTP SERVER ?i taught it should be: $session = new Session("PUBLIC_IP", 8984, "admin", "admin");That's why i'm looking to someone to test it in his own server with his own ip to find the problem.
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : BaseX <basex-talk at mailman.uni-konstanz.de>
Envoyé le : Mercredi 15 juin 2016 8h49
Objet : Re: [basex-talk] question about http server
You need to use 8984 for the HTTP Server and 1984 for the database server. – Please find some more details in our documentation, I hope this gives you some more insight.
Quoted text · Mohamed kharrat · 96 lines
On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > in the actual script, it's configured at 8984 port for remote testing. > But i have used 1984 port when i have tested locally, it's working of > course. > What i'm looking for is the test remotely > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 6h28 > > Objet : Re: [basex-talk] question about http server > > Are you sure that your code works locally? You seem to address the BaseX > server with the HTTP address (8984), and you should probably use 1984. > Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: > > Anyone can please try to execute the file remotely? > > ________________________________ > De : Mohamed kharrat <med_khr at yahoo.fr> > À : Christian Grün <christian.gruen at gmail.com> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 17h47 > Objet : Re: [basex-talk] question about http server > > can you please now see in attachement the php file containing the connexion > of baseX ? > it do not work for me, it show me (cannot communicate with server) > > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mardi 7 juin 2016 17h39 > Objet : Re: [basex-talk] question about http server > > It both works for me. > > A little hint: Better try to avoid posting private URLs to the list. > > > On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Can you please try this 2 adress and tell me what you get? >> >> http://197.0.28.226:8984 >> >> and >> http://197.0.28.226:80 >> >> Thanks >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 11h07 >> Objet : Re: [basex-talk] question about http server >> >> Hi Mohamed, >> >> This sounds like a general port issue, it’s probably not strictly >> related to BaseX. Did you check your firewall? >> >> Regards, >> Christian >> >> >> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> Hi, >>> i have setted my pc as server over TinyWeb >>> i have everything ok. >>> i opened in my pc 8984 port. >>> if i execute my php file containing xquery query locally, it works but >>> if i execute it remotely over the ip and port, it show me this message: >>> can't communicate with server. >>> >>> Anyone have an idea about that? >>> >>> Thanks >>> >> >> > > > > > >
CG
Christian Grün15 Jun 2016 11:02 #
Quoted text · Mohamed kharrat · 1 line
> $session = new Session("PUBLIC_IP", 8984, "admin", "admin");
And like I said: Read our documentation ;) You are using the HTTP port instead of the database port.
Quoted text · Mohamed kharrat · 2 lines
> That's why i'm looking to someone to test it in his own server with his own > ip to find the problem.
Wouldn’t help.
Quoted text · Mohamed kharrat · 112 lines
> ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 8h49 > > Objet : Re: [basex-talk] question about http server > > You need to use 8984 for the HTTP Server and 1984 for the database > server. – Please find some more details in our documentation, I hope > this gives you some more insight. > > > On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> in the actual script, it's configured at 8984 port for remote testing. >> But i have used 1984 port when i have tested locally, it's working of >> course. >> What i'm looking for is the test remotely >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mercredi 15 juin 2016 6h28 >> >> Objet : Re: [basex-talk] question about http server >> >> Are you sure that your code works locally? You seem to address the BaseX >> server with the HTTP address (8984), and you should probably use 1984. >> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >> >> Anyone can please try to execute the file remotely? >> >> ________________________________ >> De : Mohamed kharrat <med_khr at yahoo.fr> >> À : Christian Grün <christian.gruen at gmail.com> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 17h47 >> Objet : Re: [basex-talk] question about http server >> >> can you please now see in attachement the php file containing the >> connexion >> of baseX ? >> it do not work for me, it show me (cannot communicate with server) >> >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 17h39 >> Objet : Re: [basex-talk] question about http server >> >> It both works for me. >> >> A little hint: Better try to avoid posting private URLs to the list. >> >> >> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> Can you please try this 2 adress and tell me what you get? >>> >>> http://197.0.28.226:8984 >>> >>> and >>> http://197.0.28.226:80 >>> >>> Thanks >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 11h07 >>> Objet : Re: [basex-talk] question about http server >>> >>> Hi Mohamed, >>> >>> This sounds like a general port issue, it’s probably not strictly >>> related to BaseX. Did you check your firewall? >>> >>> Regards, >>> Christian >>> >>> >>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>>> Hi, >>>> i have setted my pc as server over TinyWeb >>>> i have everything ok. >>>> i opened in my pc 8984 port. >>>> if i execute my php file containing xquery query locally, it works but >>>> if i execute it remotely over the ip and port, it show me this message: >>>> can't communicate with server. >>>> >>>> Anyone have an idea about that? >>>> >>>> Thanks >>>> >>> >>> >> >> >> >> >> >> > >
MK
Mohamed kharrat16 Jun 2016 04:26 #
Hi Sir,i have already read the documentation.It's not logic what you said.you told me to write:> $session = new Session("localhost", 1984, "admin", "admin"); and to run baseX server with 8984 port
ok, i'm following you.but my php files are not on local pc. they are in other server and i want to execute them from there.what you told me is correct if i just want to call php file remotely when it is place in the same server with BaseX server.This is what i have:
- 1 hosting server (i bought a space with a domain name): i have put my php file+ baseX php client in this sever.- My Pc (running BaseX server on 8984 port) i have already made a NAT in my router and everyone can access my pc with public IP of my routerSo my problem is how to run my php file to execute xquery query in my pc which contain BaseX. I'm doing all that becaue my hosting server do not allow me to install BaseX on it.and i do not want to put my php file in my pc, because it must be executed in hosting server,only the part of xquery query must be send to my pc to be executed. I don't know if i have described well my problem.Thank you
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : BaseX <basex-talk at mailman.uni-konstanz.de>
Envoyé le : Mercredi 15 juin 2016 10h02
Objet : Re: [basex-talk] question about http server
Quoted text · Christian Grün · 1 line
> $session = new Session("PUBLIC_IP", 8984, "admin", "admin");
And like I said: Read our documentation ;) You are using the HTTP port instead of the database port.
Quoted text · Christian Grün · 2 lines
> That's why i'm looking to someone to test it in his own server with his own > ip to find the problem.
Wouldn’t help.
Quoted text · Christian Grün · 112 lines
> ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 8h49 > > Objet : Re: [basex-talk] question about http server > > You need to use 8984 for the HTTP Server and 1984 for the database > server. – Please find some more details in our documentation, I hope > this gives you some more insight. > > > On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> in the actual script, it's configured at 8984 port for remote testing. >> But i have used 1984 port when i have tested locally, it's working of >> course. >> What i'm looking for is the test remotely >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mercredi 15 juin 2016 6h28 >> >> Objet : Re: [basex-talk] question about http server >> >> Are you sure that your code works locally? You seem to address the BaseX >> server with the HTTP address (8984), and you should probably use 1984. >> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >> >> Anyone can please try to execute the file remotely? >> >> ________________________________ >> De : Mohamed kharrat <med_khr at yahoo.fr> >> À : Christian Grün <christian.gruen at gmail.com> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 17h47 >> Objet : Re: [basex-talk] question about http server >> >> can you please now see in attachement the php file containing the >> connexion >> of baseX ? >> it do not work for me, it show me (cannot communicate with server) >> >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : "basex-talk at mailman.uni-konstanz.de" >> <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mardi 7 juin 2016 17h39 >> Objet : Re: [basex-talk] question about http server >> >> It both works for me. >> >> A little hint: Better try to avoid posting private URLs to the list. >> >> >> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> Can you please try this 2 adress and tell me what you get? >>> >>> http://197.0.28.226:8984 >>> >>> and >>> http://197.0.28.226:80 >>> >>> Thanks >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 11h07 >>> Objet : Re: [basex-talk] question about http server >>> >>> Hi Mohamed, >>> >>> This sounds like a general port issue, it’s probably not strictly >>> related to BaseX. Did you check your firewall? >>> >>> Regards, >>> Christian >>> >>> >>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>>> Hi, >>>> i have setted my pc as server over TinyWeb >>>> i have everything ok. >>>> i opened in my pc 8984 port. >>>> if i execute my php file containing xquery query locally, it works but >>>> if i execute it remotely over the ip and port, it show me this message: >>>> can't communicate with server. >>>> >>>> Anyone have an idea about that? >>>> >>>> Thanks >>>> >>> >>> >> >> >> >> >> >> > >
CG
Christian Grün18 Jun 2016 14:11 #
Quoted text · Mohamed kharrat · 4 lines
> It's not logic what you said. > you told me to write: >> $session = new Session("localhost", 1984, "admin", "admin"); > and to run baseX server with 8984 port
I don’t believe I sad exactly that. Instead I told you read our documentation ;) What articles did you have a look at so far? Maybe we can improve them if you give us some concrete hints.
By default, 1984 is the port of the database server. 8984 is the port of the HTTP Server. If you use REST, RESTXQ or WebDAV, you will need to talk to 8984. If you use the language bindings, you will need to talk to 1984. In both cases, it does *not* matter if your BaseX instances run locally or remotely.
Cheers
Christian
Quoted text · Mohamed kharrat · 162 lines
> ok, i'm following you. > but my php files are not on local pc. they are in other server and i want to > execute them from there. > what you told me is correct if i just want to call php file remotely when it > is place in the same server with BaseX server. > This is what i have: > > - 1 hosting server (i bought a space with a domain name): i have put my php > file+ baseX php client in this sever. > - My Pc (running BaseX server on 8984 port) i have already made a NAT in my > router and everyone can access my pc with public IP of my router > So my problem is how to run my php file to execute xquery query in my pc > which contain BaseX. > > I'm doing all that becaue my hosting server do not allow me to install BaseX > on it. > and i do not want to put my php file in my pc, because it must be executed > in hosting server, > only the part of xquery query must be send to my pc to be executed. > > I don't know if i have described well my problem. > Thank you > > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 10h02 > > Objet : Re: [basex-talk] question about http server > >> $session = new Session("PUBLIC_IP", 8984, "admin", "admin"); > > And like I said: Read our documentation ;) You are using the HTTP port > instead of the database port. > >> That's why i'm looking to someone to test it in his own server with his >> own >> ip to find the problem. > > Wouldn’t help. > > > > >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mercredi 15 juin 2016 8h49 >> >> Objet : Re: [basex-talk] question about http server >> >> You need to use 8984 for the HTTP Server and 1984 for the database >> server. – Please find some more details in our documentation, I hope >> this gives you some more insight. >> >> >> On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> in the actual script, it's configured at 8984 port for remote testing. >>> But i have used 1984 port when i have tested locally, it's working of >>> course. >>> What i'm looking for is the test remotely >>> >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mercredi 15 juin 2016 6h28 >>> >>> Objet : Re: [basex-talk] question about http server >>> >>> Are you sure that your code works locally? You seem to address the BaseX >>> server with the HTTP address (8984), and you should probably use 1984. >>> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >>> >>> Anyone can please try to execute the file remotely? >>> >>> ________________________________ >>> De : Mohamed kharrat <med_khr at yahoo.fr> >>> À : Christian Grün <christian.gruen at gmail.com> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 17h47 >>> Objet : Re: [basex-talk] question about http server >>> >>> can you please now see in attachement the php file containing the >>> connexion >>> of baseX ? >>> it do not work for me, it show me (cannot communicate with server) >>> >>> >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 17h39 >>> Objet : Re: [basex-talk] question about http server >>> >>> It both works for me. >>> >>> A little hint: Better try to avoid posting private URLs to the list. >>> >>> >>> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>>> Can you please try this 2 adress and tell me what you get? >>>> >>>> http://197.0.28.226:8984 >>>> >>>> and >>>> http://197.0.28.226:80 >>>> >>>> Thanks >>>> >>>> ________________________________ >>>> De : Christian Grün <christian.gruen at gmail.com> >>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>> <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mardi 7 juin 2016 11h07 >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> Hi Mohamed, >>>> >>>> This sounds like a general port issue, it’s probably not strictly >>>> related to BaseX. Did you check your firewall? >>>> >>>> Regards, >>>> Christian >>>> >>>> >>>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>> wrote: >>>>> Hi, >>>>> i have setted my pc as server over TinyWeb >>>>> i have everything ok. >>>>> i opened in my pc 8984 port. >>>>> if i execute my php file containing xquery query locally, it works but >>>>> if i execute it remotely over the ip and port, it show me this message: >>>>> can't communicate with server. >>>>> >>>>> Anyone have an idea about that? >>>>> >>>>> Thanks >>>>> >>>> >>>> >>> >>> >>> >>> >>> >>> >> >> > >
MK
Mohamed kharrat18 Jun 2016 18:35 #
Hi Mr Christian Grün,
i need to understand something :
when i put my php script containing xquery query in a SERVER A (the server containt APACHE only for executing php) this is the name of my file: SemantiqFn.php
and this is the adress of this server to execute the php file:www.works.tn/works.tn/user1/fnxquerybasex/SemantiqFn.php
this file containt this line for connexion: $session = new Session("197.0.251.200", 8984, "admin", "admin"); and in other site i have SERVER B windows (containing installed BaseX ): IP 197.0.251.200in this server B firewall is desactivated and the port 8984 is activated and opened I have also connected successfully to this ip with this port: 197.0.251.200:8984
* the php file is working good when i execute it locally in server B of course with "localhost" and port 1984 but when i execute this file in SERVER A, it do not works, and show me cannot communicate with server At least tell me if what i have already done is correct or there is something missing ? Many ThanksBest regards
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Cc : BaseX <basex-talk at mailman.uni-konstanz.de>
Envoyé le : Samedi 18 juin 2016 13h11
Objet : Re: [basex-talk] question about http server
Quoted text · Christian Grün · 4 lines
> It's not logic what you said. > you told me to write: >> $session = new Session("localhost", 1984, "admin", "admin"); > and to run baseX server with 8984 port
I don’t believe I sad exactly that. Instead I told you read our documentation ;) What articles did you have a look at so far? Maybe we can improve them if you give us some concrete hints.
By default, 1984 is the port of the database server. 8984 is the port of the HTTP Server. If you use REST, RESTXQ or WebDAV, you will need to talk to 8984. If you use the language bindings, you will need to talk to 1984. In both cases, it does *not* matter if your BaseX instances run locally or remotely.
Cheers
Christian
Quoted text · Christian Grün · 162 lines
> ok, i'm following you. > but my php files are not on local pc. they are in other server and i want to > execute them from there. > what you told me is correct if i just want to call php file remotely when it > is place in the same server with BaseX server. > This is what i have: > > - 1 hosting server (i bought a space with a domain name): i have put my php > file+ baseX php client in this sever. > - My Pc (running BaseX server on 8984 port) i have already made a NAT in my > router and everyone can access my pc with public IP of my router > So my problem is how to run my php file to execute xquery query in my pc > which contain BaseX. > > I'm doing all that becaue my hosting server do not allow me to install BaseX > on it. > and i do not want to put my php file in my pc, because it must be executed > in hosting server, > only the part of xquery query must be send to my pc to be executed. > > I don't know if i have described well my problem. > Thank you > > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Mercredi 15 juin 2016 10h02 > > Objet : Re: [basex-talk] question about http server > >> $session = new Session("PUBLIC_IP", 8984, "admin", "admin"); > > And like I said: Read our documentation ;) You are using the HTTP port > instead of the database port. > >> That's why i'm looking to someone to test it in his own server with his >> own >> ip to find the problem. > > Wouldn’t help. > > > > >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mercredi 15 juin 2016 8h49 >> >> Objet : Re: [basex-talk] question about http server >> >> You need to use 8984 for the HTTP Server and 1984 for the database >> server. – Please find some more details in our documentation, I hope >> this gives you some more insight. >> >> >> On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>> in the actual script, it's configured at 8984 port for remote testing. >>> But i have used 1984 port when i have tested locally, it's working of >>> course. >>> What i'm looking for is the test remotely >>> >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mercredi 15 juin 2016 6h28 >>> >>> Objet : Re: [basex-talk] question about http server >>> >>> Are you sure that your code works locally? You seem to address the BaseX >>> server with the HTTP address (8984), and you should probably use 1984. >>> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >>> >>> Anyone can please try to execute the file remotely? >>> >>> ________________________________ >>> De : Mohamed kharrat <med_khr at yahoo.fr> >>> À : Christian Grün <christian.gruen at gmail.com> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 17h47 >>> Objet : Re: [basex-talk] question about http server >>> >>> can you please now see in attachement the php file containing the >>> connexion >>> of baseX ? >>> it do not work for me, it show me (cannot communicate with server) >>> >>> >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : "basex-talk at mailman.uni-konstanz.de" >>> <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mardi 7 juin 2016 17h39 >>> Objet : Re: [basex-talk] question about http server >>> >>> It both works for me. >>> >>> A little hint: Better try to avoid posting private URLs to the list. >>> >>> >>> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >>>> Can you please try this 2 adress and tell me what you get? >>>> >>>> http://197.0.28.226:8984 >>>> >>>> and >>>> http://197.0.28.226:80 >>>> >>>> Thanks >>>> >>>> ________________________________ >>>> De : Christian Grün <christian.gruen at gmail.com> >>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>> <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mardi 7 juin 2016 11h07 >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> Hi Mohamed, >>>> >>>> This sounds like a general port issue, it’s probably not strictly >>>> related to BaseX. Did you check your firewall? >>>> >>>> Regards, >>>> Christian >>>> >>>> >>>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>> wrote: >>>>> Hi, >>>>> i have setted my pc as server over TinyWeb >>>>> i have everything ok. >>>>> i opened in my pc 8984 port. >>>>> if i execute my php file containing xquery query locally, it works but >>>>> if i execute it remotely over the ip and port, it show me this message: >>>>> can't communicate with server. >>>>> >>>>> Anyone have an idea about that? >>>>> >>>>> Thanks >>>>> >>>> >>>> >>> >>> >>> >>> >>> >>> >> >> > >
CG
Christian Grün18 Jun 2016 19:21 #
Hi Mohamed,
* You are working with the PHP client of BaseX.
* This client communicates with the BaseX database server.
* This server listens to port 1984 (as long as you haven’t updated your .basex configuration file).
* Port 8984 is reserved for HTTP Services
* HTTP Services are REST, RESTXQ, WebDAV
* As such, you won’t be successful sending your requests to 8984, no matter if you address a local or remote instance of BaseX.
Regards,
Christian
Quoted text · Mohamed kharrat · 239 lines
On Sat, Jun 18, 2016 at 6:35 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: > Hi Mr Christian Grün, > > i need to understand something : > > when i put my php script containing xquery query in a SERVER A (the server > containt APACHE only for executing php) > > this is the name of my file: SemantiqFn.php > > > and this is the adress of this server to execute the php file: > www.works.tn/works.tn/user1/fnxquerybasex/SemantiqFn.php > > this file containt this line for connexion: $session = new > Session("197.0.251.200", 8984, "admin", "admin"); > > and in other site i have SERVER B windows (containing installed BaseX ): IP > 197.0.251.200 > in this server B firewall is desactivated and the port 8984 is activated > and opened > > I have also connected successfully to this ip with this port: > 197.0.251.200:8984 > > * the php file is working good when i execute it locally in server B of > course with "localhost" and port 1984 > > but when i execute this file in SERVER A, it do not works, and show me > cannot communicate with server > > At least tell me if what i have already done is correct or there is > something missing ? > > Many Thanks > Best regards > > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Envoyé le : Samedi 18 juin 2016 13h11 > > Objet : Re: [basex-talk] question about http server > >> It's not logic what you said. >> you told me to write: >>> $session = new Session("localhost", 1984, "admin", "admin"); >> and to run baseX server with 8984 port > > I don’t believe I sad exactly that. Instead I told you read our > documentation ;) What articles did you have a look at so far? Maybe we > can improve them if you give us some concrete hints. > > By default, 1984 is the port of the database server. 8984 is the port > of the HTTP Server. If you use REST, RESTXQ or WebDAV, you will need > to talk to 8984. If you use the language bindings, you will need to > talk to 1984. In both cases, it does *not* matter if your BaseX > instances run locally or remotely. > > Cheers > Christian > > > > >> ok, i'm following you. >> but my php files are not on local pc. they are in other server and i want >> to >> execute them from there. >> what you told me is correct if i just want to call php file remotely when >> it >> is place in the same server with BaseX server. >> This is what i have: >> >> - 1 hosting server (i bought a space with a domain name): i have put my >> php >> file+ baseX php client in this sever. >> - My Pc (running BaseX server on 8984 port) i have already made a NAT in >> my >> router and everyone can access my pc with public IP of my router >> So my problem is how to run my php file to execute xquery query in my pc >> which contain BaseX. >> >> I'm doing all that becaue my hosting server do not allow me to install >> BaseX >> on it. >> and i do not want to put my php file in my pc, because it must be executed >> in hosting server, >> only the part of xquery query must be send to my pc to be executed. >> >> I don't know if i have described well my problem. >> Thank you >> >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Mercredi 15 juin 2016 10h02 >> >> Objet : Re: [basex-talk] question about http server >> >>> $session = new Session("PUBLIC_IP", 8984, "admin", "admin"); >> >> And like I said: Read our documentation ;) You are using the HTTP port >> instead of the database port. >> >>> That's why i'm looking to someone to test it in his own server with his >>> own >>> ip to find the problem. >> >> Wouldn’t help. >> >> >> >> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mercredi 15 juin 2016 8h49 >>> >>> Objet : Re: [basex-talk] question about http server >>> >>> You need to use 8984 for the HTTP Server and 1984 for the database >>> server. – Please find some more details in our documentation, I hope >>> this gives you some more insight. >>> >>> >>> On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> >>> wrote: >>>> in the actual script, it's configured at 8984 port for remote testing. >>>> But i have used 1984 port when i have tested locally, it's working of >>>> course. >>>> What i'm looking for is the test remotely >>>> >>>> >>>> ________________________________ >>>> De : Christian Grün <christian.gruen at gmail.com> >>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mercredi 15 juin 2016 6h28 >>>> >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> Are you sure that your code works locally? You seem to address the BaseX >>>> server with the HTTP address (8984), and you should probably use 1984. >>>> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >>>> >>>> Anyone can please try to execute the file remotely? >>>> >>>> ________________________________ >>>> De : Mohamed kharrat <med_khr at yahoo.fr> >>>> À : Christian Grün <christian.gruen at gmail.com> >>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>> <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mardi 7 juin 2016 17h47 >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> can you please now see in attachement the php file containing the >>>> connexion >>>> of baseX ? >>>> it do not work for me, it show me (cannot communicate with server) >>>> >>>> >>>> >>>> ________________________________ >>>> De : Christian Grün <christian.gruen at gmail.com> >>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>> <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mardi 7 juin 2016 17h39 >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> It both works for me. >>>> >>>> A little hint: Better try to avoid posting private URLs to the list. >>>> >>>> >>>> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>> wrote: >>>>> Can you please try this 2 adress and tell me what you get? >>>>> >>>>> http://197.0.28.226:8984 >>>>> >>>>> and >>>>> http://197.0.28.226:80 >>>>> >>>>> Thanks >>>>> >>>>> ________________________________ >>>>> De : Christian Grün <christian.gruen at gmail.com> >>>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>>> <basex-talk at mailman.uni-konstanz.de> >>>>> Envoyé le : Mardi 7 juin 2016 11h07 >>>>> Objet : Re: [basex-talk] question about http server >>>>> >>>>> Hi Mohamed, >>>>> >>>>> This sounds like a general port issue, it’s probably not strictly >>>>> related to BaseX. Did you check your firewall? >>>>> >>>>> Regards, >>>>> Christian >>>>> >>>>> >>>>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>>> wrote: >>>>>> Hi, >>>>>> i have setted my pc as server over TinyWeb >>>>>> i have everything ok. >>>>>> i opened in my pc 8984 port. >>>>>> if i execute my php file containing xquery query locally, it works but >>>>>> if i execute it remotely over the ip and port, it show me this >>>>>> message: >>>>>> can't communicate with server. >>>>>> >>>>>> Anyone have an idea about that? >>>>>> >>>>>> Thanks >>>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
CG
Christian Grün18 Jun 2016 19:28 #
…just a little mail in private: I am wondering if you are reading my mails at all? I have indicated at least three times that you should use port 1984, and you seem to ignore my questions. Please be a little bit more attentive.
Thank you in advance, no hard feelings,
Christian
Quoted text · Christian Grün · 256 lines
On Sat, Jun 18, 2016 at 7:21 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Mohamed, > > * You are working with the PHP client of BaseX. > * This client communicates with the BaseX database server. > * This server listens to port 1984 (as long as you haven’t updated > your .basex configuration file). > * Port 8984 is reserved for HTTP Services > * HTTP Services are REST, RESTXQ, WebDAV > * As such, you won’t be successful sending your requests to 8984, no > matter if you address a local or remote instance of BaseX. > > Regards, > Christian > > > On Sat, Jun 18, 2016 at 6:35 PM, Mohamed kharrat <med_khr at yahoo.fr> wrote: >> Hi Mr Christian Grün, >> >> i need to understand something : >> >> when i put my php script containing xquery query in a SERVER A (the server >> containt APACHE only for executing php) >> >> this is the name of my file: SemantiqFn.php >> >> >> and this is the adress of this server to execute the php file: >> www.works.tn/works.tn/user1/fnxquerybasex/SemantiqFn.php >> >> this file containt this line for connexion: $session = new >> Session("197.0.251.200", 8984, "admin", "admin"); >> >> and in other site i have SERVER B windows (containing installed BaseX ): IP >> 197.0.251.200 >> in this server B firewall is desactivated and the port 8984 is activated >> and opened >> >> I have also connected successfully to this ip with this port: >> 197.0.251.200:8984 >> >> * the php file is working good when i execute it locally in server B of >> course with "localhost" and port 1984 >> >> but when i execute this file in SERVER A, it do not works, and show me >> cannot communicate with server >> >> At least tell me if what i have already done is correct or there is >> something missing ? >> >> Many Thanks >> Best regards >> >> >> ________________________________ >> De : Christian Grün <christian.gruen at gmail.com> >> À : Mohamed kharrat <med_khr at yahoo.fr> >> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >> Envoyé le : Samedi 18 juin 2016 13h11 >> >> Objet : Re: [basex-talk] question about http server >> >>> It's not logic what you said. >>> you told me to write: >>>> $session = new Session("localhost", 1984, "admin", "admin"); >>> and to run baseX server with 8984 port >> >> I don’t believe I sad exactly that. Instead I told you read our >> documentation ;) What articles did you have a look at so far? Maybe we >> can improve them if you give us some concrete hints. >> >> By default, 1984 is the port of the database server. 8984 is the port >> of the HTTP Server. If you use REST, RESTXQ or WebDAV, you will need >> to talk to 8984. If you use the language bindings, you will need to >> talk to 1984. In both cases, it does *not* matter if your BaseX >> instances run locally or remotely. >> >> Cheers >> Christian >> >> >> >> >>> ok, i'm following you. >>> but my php files are not on local pc. they are in other server and i want >>> to >>> execute them from there. >>> what you told me is correct if i just want to call php file remotely when >>> it >>> is place in the same server with BaseX server. >>> This is what i have: >>> >>> - 1 hosting server (i bought a space with a domain name): i have put my >>> php >>> file+ baseX php client in this sever. >>> - My Pc (running BaseX server on 8984 port) i have already made a NAT in >>> my >>> router and everyone can access my pc with public IP of my router >>> So my problem is how to run my php file to execute xquery query in my pc >>> which contain BaseX. >>> >>> I'm doing all that becaue my hosting server do not allow me to install >>> BaseX >>> on it. >>> and i do not want to put my php file in my pc, because it must be executed >>> in hosting server, >>> only the part of xquery query must be send to my pc to be executed. >>> >>> I don't know if i have described well my problem. >>> Thank you >>> >>> >>> >>> ________________________________ >>> De : Christian Grün <christian.gruen at gmail.com> >>> À : Mohamed kharrat <med_khr at yahoo.fr> >>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>> Envoyé le : Mercredi 15 juin 2016 10h02 >>> >>> Objet : Re: [basex-talk] question about http server >>> >>>> $session = new Session("PUBLIC_IP", 8984, "admin", "admin"); >>> >>> And like I said: Read our documentation ;) You are using the HTTP port >>> instead of the database port. >>> >>>> That's why i'm looking to someone to test it in his own server with his >>>> own >>>> ip to find the problem. >>> >>> Wouldn’t help. >>> >>> >>> >>> >>>> ________________________________ >>>> De : Christian Grün <christian.gruen at gmail.com> >>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>>> Envoyé le : Mercredi 15 juin 2016 8h49 >>>> >>>> Objet : Re: [basex-talk] question about http server >>>> >>>> You need to use 8984 for the HTTP Server and 1984 for the database >>>> server. – Please find some more details in our documentation, I hope >>>> this gives you some more insight. >>>> >>>> >>>> On Wed, Jun 15, 2016 at 9:45 AM, Mohamed kharrat <med_khr at yahoo.fr> >>>> wrote: >>>>> in the actual script, it's configured at 8984 port for remote testing. >>>>> But i have used 1984 port when i have tested locally, it's working of >>>>> course. >>>>> What i'm looking for is the test remotely >>>>> >>>>> >>>>> ________________________________ >>>>> De : Christian Grün <christian.gruen at gmail.com> >>>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>>> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> >>>>> Envoyé le : Mercredi 15 juin 2016 6h28 >>>>> >>>>> Objet : Re: [basex-talk] question about http server >>>>> >>>>> Are you sure that your code works locally? You seem to address the BaseX >>>>> server with the HTTP address (8984), and you should probably use 1984. >>>>> Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" <med_khr at yahoo.fr>: >>>>> >>>>> Anyone can please try to execute the file remotely? >>>>> >>>>> ________________________________ >>>>> De : Mohamed kharrat <med_khr at yahoo.fr> >>>>> À : Christian Grün <christian.gruen at gmail.com> >>>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>>> <basex-talk at mailman.uni-konstanz.de> >>>>> Envoyé le : Mardi 7 juin 2016 17h47 >>>>> Objet : Re: [basex-talk] question about http server >>>>> >>>>> can you please now see in attachement the php file containing the >>>>> connexion >>>>> of baseX ? >>>>> it do not work for me, it show me (cannot communicate with server) >>>>> >>>>> >>>>> >>>>> ________________________________ >>>>> De : Christian Grün <christian.gruen at gmail.com> >>>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>>> <basex-talk at mailman.uni-konstanz.de> >>>>> Envoyé le : Mardi 7 juin 2016 17h39 >>>>> Objet : Re: [basex-talk] question about http server >>>>> >>>>> It both works for me. >>>>> >>>>> A little hint: Better try to avoid posting private URLs to the list. >>>>> >>>>> >>>>> On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>>> wrote: >>>>>> Can you please try this 2 adress and tell me what you get? >>>>>> >>>>>> http://197.0.28.226:8984 >>>>>> >>>>>> and >>>>>> http://197.0.28.226:80 >>>>>> >>>>>> Thanks >>>>>> >>>>>> ________________________________ >>>>>> De : Christian Grün <christian.gruen at gmail.com> >>>>>> À : Mohamed kharrat <med_khr at yahoo.fr> >>>>>> Cc : "basex-talk at mailman.uni-konstanz.de" >>>>>> <basex-talk at mailman.uni-konstanz.de> >>>>>> Envoyé le : Mardi 7 juin 2016 11h07 >>>>>> Objet : Re: [basex-talk] question about http server >>>>>> >>>>>> Hi Mohamed, >>>>>> >>>>>> This sounds like a general port issue, it’s probably not strictly >>>>>> related to BaseX. Did you check your firewall? >>>>>> >>>>>> Regards, >>>>>> Christian >>>>>> >>>>>> >>>>>> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat <med_khr at yahoo.fr> >>>>>> wrote: >>>>>>> Hi, >>>>>>> i have setted my pc as server over TinyWeb >>>>>>> i have everything ok. >>>>>>> i opened in my pc 8984 port. >>>>>>> if i execute my php file containing xquery query locally, it works but >>>>>>> if i execute it remotely over the ip and port, it show me this >>>>>>> message: >>>>>>> can't communicate with server. >>>>>>> >>>>>>> Anyone have an idea about that? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >>
MK
Mohamed kharrat20 Jun 2016 11:08 #
Hi Mr christian,Well, i have contacted the hosting company, the told me that the port 1984 is closed in their server for securty reasons.I'm wondering if we can change the configuration to set another port? Best regards
De : Christian Grün <christian.gruen at gmail.com>
À : Mohamed kharrat <med_khr at yahoo.fr>
Envoyé le : Lundi 20 juin 2016 0h48
Objet : Re: [basex-talk] question about http server
Hi Mohamed> and last question about the DB: if i use db:open() it will be possible to put my DB in my host server ?db:open will open a database on the machine where BaseX is installed. Please check out the documentation for more details).Cheers Christian
Quoted text · Christian Grün · 27 lines
> > > ________________________________ > De : Christian Grün <christian.gruen at gmail.com> > À : Mohamed kharrat <med_khr at yahoo.fr> > Envoyé le : Dimanche 19 juin 2016 23h27 > > Objet : Re: [basex-talk] question about http server > > > and please execute it again. > > This is what I got now: > > <li>2.xml talk about 3.xml</li> > <li>2.xml talk about 7.xml</li> > <li>2.xml talk about 14.xml</li> > <li>2.xml talk about 11.xml</li> > > > > but supposing i want to put it in my host server. if possible, i will put > > them where? and what i have to change in php code? > > > It’s usually better to create a database from your input documents > (e.g. with the BaseX GUI), and address it with db:open() instead of > doc(). >
DK
Dirk Kirsten20 Jun 2016 11:25 #
Hello Mohamed,
sure you can. It is defined as a global option
SERVERPORT, Take a look at our documentation at http://docs.basex.org/wiki/Options#SERVERPORT to see how to change it.
Cheers
DirkQuoted text · Mohamed kharrat · 53 lines
On 06/20/2016 11:08 AM, Mohamed kharrat wrote: > Hi Mr christian, > Well, i have contacted the hosting company, the told me that the port > 1984 is closed in their server for securty reasons. > I'm wondering if we can change the configuration to set another port? > > Best regards > > > ------------------------------------------------------------------------ > *De :* Christian Grün <christian.gruen at gmail.com> > *À :* Mohamed kharrat <med_khr at yahoo.fr> > *Envoyé le :* Lundi 20 juin 2016 0h48 > *Objet :* Re: [basex-talk] question about http server > > Hi Mohamed > > and last question about the DB: if i use db:open() it will be > possible to put my DB in my host server ? > db:open will open a database on the machine where BaseX is installed. > Please check out the documentation for more details). > Cheers > Christian > > > > > > ________________________________ > > De : Christian Grün <christian.gruen at gmail.com > <mailto:christian.gruen at gmail.com>> > > À : Mohamed kharrat <med_khr at yahoo.fr <mailto:med_khr at yahoo.fr>> > > Envoyé le : Dimanche 19 juin 2016 23h27 > > > > Objet : Re: [basex-talk] question about http server > > > > > and please execute it again. > > > > This is what I got now: > > > > <li>2.xml talk about 3.xml</li> > > <li>2.xml talk about 7.xml</li> > > <li>2.xml talk about 14.xml</li> > > <li>2.xml talk about 11.xml</li> > > > > > > > but supposing i want to put it in my host server. if possible, i > will put > > > them where? and what i have to change in php code? > > > > > > It’s usually better to create a database from your input documents > > (e.g. with the BaseX GUI), and address it with db:open() instead of > > doc(). > > > >
--
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
| Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 91 68 276, Fax: 0049 7531 20 05 22
Written for BaseX 8.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery