Closed ksrichard closed 9 years ago
okay if i comment out the other encryptions and I'm using only PLAIN it works, but not because if I wants to attach with strophe i got an error: "401 invalid sid"
Hi,
I am using openfire in server and candy chat in my website. When I am trying to use xmpp-prebind-php library, I got the PHP Fatal error: Uncaught exception 'XmppPrebindException' with message 'Invalid login'.
I am using the below code: require_once './prebind/lib/XmppPrebind.php'; $xmppPrebind = new XmppPrebind('domain.com', 'http://domain.com:5280/http-bind/', 'Candy', false, true); $xmppPrebind->connect('akhilesh', 'akhilesh123'); $xmppPrebind->auth(); $sessionInfo = $xmppPrebind->getSessionInfo();
My openfire is installed in http://domain.com:9090
Anybody can solve this issue, Please help me...
Thanks, Akhilesh
Hi Akhilesh
Are you sure that you're using the correct username and password?
Sent from my iPhone
On 18.07.2014, at 08:52, akhileshpv notifications@github.com wrote:
Hi,
I am using openfire in server and candy chat in my website. When I am trying to use xmpp-prebind-php library, I got the PHP Fatal error: Uncaught exception 'XmppPrebindException' with message 'Invalid login'.
I am using the below code: require_once './prebind/lib/XmppPrebind.php'; $xmppPrebind = new XmppPrebind('domain.com', 'http://domain.com:5280/http-bind/', 'Candy', false, true); $xmppPrebind->connect('akhilesh', 'akhilesh123'); $xmppPrebind->auth(); $sessionInfo = $xmppPrebind->getSessionInfo();
My openfire is installed in http://domain.com:9090
Anybody can solve this issue, Please help me...
Thanks, Akhilesh
— Reply to this email directly or view it on GitHub.
Hi Jonatan,
Thanks for your mail. I am sure, this is correct username and password. Because I can login from candy chat with this same username and and password.
Full error report displayed in the browser is: Fatal error: Uncaught exception 'XmppPrebindException' with message 'Invalid login' in /home/dev001/projects/domain/candy/example/prebind/lib/XmppPrebind.php:188 Stack trace: #0 /home/dev001/projects/domain/candy/example/index.php(9): XmppPrebind->auth() #1 {main} thrown in /home/dev001/projects/domain/candy/example/prebind/lib/XmppPrebind.php on line 188
The response shows in the console log is: SENT: <?xml version="1.0" encoding="UTF-8"?>
Thansk, Akhilesh
On Fri, Jul 18, 2014 at 4:10 PM, Jonatan Männchen notifications@github.com wrote:
Hi Akhilesh
Are you sure that you're using the correct username and password?
Sent from my iPhone
On 18.07.2014, at 08:52, akhileshpv notifications@github.com wrote:
Hi,
I am using openfire in server and candy chat in my website. When I am trying to use xmpp-prebind-php library, I got the PHP Fatal error: Uncaught exception 'XmppPrebindException' with message 'Invalid login'.
I am using the below code: require_once './prebind/lib/XmppPrebind.php'; $xmppPrebind = new XmppPrebind('domain.com', ' http://domain.com:5280/http-bind/', 'Candy', false, true); $xmppPrebind->connect('akhilesh', 'akhilesh123'); $xmppPrebind->auth(); $sessionInfo = $xmppPrebind->getSessionInfo();
My openfire is installed in http://domain.com:9090
Anybody can solve this issue, Please help me...
Thanks, Akhilesh
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/candy-chat/xmpp-prebind-php/issues/6#issuecomment-49417821 .
AKHILESH PV Sr. Software Engineer Phone: +91 484 4054324 | akhilesh@cubettech.com
On weekdays I'm in military service and can't really analyse your logs / debug the problem...
@mweibel Do you know how to solve this? On a cellphone my ressources are verry limited ;-)
@akhileshpv could you show us by comparison a log from the failed login generated by the prebind lib?
Hi Michael,
I have tested the xmpp-prebind-php library with different encryption methods like PLAIN, CRAM-MD5 and DIGEST-MD5. But I got different logs in console for each encryption methods. Can you please check it? Let me know, do we need to update any settings in openfire for properly process this section?
Openfire URL: http://cnexion.com:9090 HTTP Bind port: 5280 Login Credentials: akhilesh / akhilesh123
sid: f4a274d4 encryption used: PLAIN PLAIN Auth String: YWtoaWxlc2hAY25leGlvbi5jb20vQ2FuZHkAYWtoaWxlc2gAYWtoaWxlc2gxMjM=
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns="
http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8"
rid="1116428488" xml:lang="en" hold="1" to="cnexion.com"
xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>
RECV:: <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" from="cnexion.com" authid="f4a274d4"
sid="f4a274d4" secure="true" requests="2" inactivity="30" polling="5"
wait="60">stream:features<mechanisms
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
RECV::
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428490" xml:lang="en" sid="f4a274d4" to="cnexion.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/> RECV::
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns="
http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8"
rid="1116428491" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client"
type="set" id="bind_1361383888"><bind
xmlns="urn:ietf:params:xml:ns:xmpp-bind">
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428492" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="session_auth_336107106"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/> RECV::
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428493" xml:lang="en" sid="f4a274d4"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">YWtoaWxlc2hAY25leGlvbi5jb20vQ2FuZHkAYWtoaWxlc2gAYWtoaWxlc2gxMjM= RECV::
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428494" xml:lang="en" sid="f4a274d4" to="cnexion.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/> RECV::
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns="
http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8"
rid="1116428495" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client"
type="set" id="bind_987398258"><bind
xmlns="urn:ietf:params:xml:ns:xmpp-bind">
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428496" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="session_auth_2069738843"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/> RECV::
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
Problem accessing /http-bind/. Reason:
Invalid SID.
sid: 18c83aae encryption used: CRAM-MD5 CRAM-MD5 Auth String: akhilesh 2d4de58dff82eaded082c7495dec2984
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns="
http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8"
rid="1177582256" xml:lang="en" hold="1" to="cnexion.com"
xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>
RECV:: <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" from="cnexion.com" authid="18c83aae"
sid="18c83aae" secure="true" requests="2" inactivity="30" polling="5"
wait="60">stream:features<mechanisms
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1177582258" xml:lang="en" sid="18c83aae"><response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">YWtoaWxlc2ggMmQ0ZGU1OGRmZjgyZWFkZWQwODJjNzQ5NWRlYzI5ODQ= RECV::
sid: bcb2256a encryption used: DIGEST-MD5
DIGEST-MD5 Auth String: username="akhilesh",realm="cnexion.com ",nonce="xPmfqceGOcKNIy2rv7KG4S4JODo0KPIPvaNc1WEK",cnonce="QbITqlwal4LDS9QJqdhSYl0uBUjhMr/LIxd5lcH7Ru4=",nc=00000001,qop=auth,digest-uri="xmpp/ cnexion.com",response=4a3f8bc78c1c36b0ae7ca6121c51839b,maxbuf=65536
SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns="
http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8"
rid="1122203497" xml:lang="en" hold="1" to="cnexion.com"
xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>
RECV:: <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" from="cnexion.com" authid="bcb2256a"
sid="bcb2256a" secure="true" requests="2" inactivity="30" polling="5"
wait="60">stream:features<mechanisms
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
Thanks, Akhilesh
On Mon, Jul 21, 2014 at 5:36 PM, Michael Weibel notifications@github.com wrote:
@akhileshpv https://github.com/akhileshpv could you show us by comparison a log from the failed login generated by the prebind lib?
— Reply to this email directly or view it on GitHub https://github.com/candy-chat/xmpp-prebind-php/issues/6#issuecomment-49597555 .
AKHILESH PV Sr. Software Engineer Phone: +91 484 4054324 | akhilesh@cubettech.com
[image: http://cubettech.com/] http://cubettech.com/
Hi Michael,
Let me know, did you get any solution for this query?
Thanks, Akhilesh
On Mon, Jul 21, 2014 at 5:44 PM, Akhilesh PV akhilesh@cubettech.com wrote:
Hi Michael,
I have tested the xmpp-prebind-php library with different encryption methods like PLAIN, CRAM-MD5 and DIGEST-MD5. But I got different logs in console for each encryption methods. Can you please check it? Let me know, do we need to update any settings in openfire for properly process this section?
Openfire URL: http://cnexion.com:9090 HTTP Bind port: 5280 Login Credentials: akhilesh / akhilesh123
sid: f4a274d4 encryption used: PLAIN PLAIN Auth String: YWtoaWxlc2hAY25leGlvbi5jb20vQ2FuZHkAYWtoaWxlc2gAYWtoaWxlc2gxMjM= SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428488" xml:lang="en" hold="1" to="cnexion.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/> RECV:: <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream=" http://etherx.jabber.org/streams" from="cnexion.com" authid="f4a274d4" sid="f4a274d4" secure="true" requests="2" inactivity="30" polling="5" wait="60">stream:features<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
DIGEST-MD5 PLAIN ANONYMOUS CRAM-MD5 <compression xmlns="http://jabber.org/features/compress">zlib <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>/stream:features SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428489" xml:lang="en" sid="f4a274d4"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">YWtoaWxlc2hAY25leGlvbi5jb20vQ2FuZHkAYWtoaWxlc2gAYWtoaWxlc2gxMjM= RECV::<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/> SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428490" xml:lang="en" sid="f4a274d4" to="cnexion.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/> RECV::stream:features SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428491" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="bind_1361383888"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>/stream:features zlib Candy RECV::<iq xmlns="jabber:client" type="result" id="bind_1361383888" to=" cnexion.com/f4a274d4"> SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428492" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="session_auth_336107106"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/> RECV::akhilesh@cnexion.com/Candy <iq xmlns="jabber:client" type="result" id="session_auth_336107106" to=" akhilesh@cnexion.com/Candy"/> SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428493" xml:lang="en" sid="f4a274d4"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">YWtoaWxlc2hAY25leGlvbi5jb20vQ2FuZHkAYWtoaWxlc2gAYWtoaWxlc2gxMjM= RECV::<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/> SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428494" xml:lang="en" sid="f4a274d4" to="cnexion.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/> RECV::stream:features SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428495" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="bind_987398258"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>/stream:features zlib Candy RECV::<stream:error xmlns:stream="http://etherx.jabber.org/streams"><conflict xmlns="urn:ietf:params:xml:ns:xmpp-streams"/>/stream:error SENT: <?xml version="1.0" encoding="UTF-8"?> <body xmlns=" http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="1116428496" xml:lang="en" sid="f4a274d4"><iq xmlns="jabber:client" type="set" id="session_auth_2069738843"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/> RECV:: <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>Error 404 Invalid SID. HTTP ERROR: 404
Problem accessing /http-bind/. Reason:
Invalid SID.
Powered by Jetty://
i used the code like in the example and i got always an error called "invalid login", I'm using openfire as the server.. can you help me? :)