Open ghost opened 10 years ago
500 Error solved with some manipulation with config, but it still unable to connect, when i wittent login pass, it return me to login pag again
can you provide me with your config.php?
<?php // important variables in the following anonymous functions: // $args['host'] : IMAP hostname // $args['user'] : IMAP username // $args['pass'] : IMAP password
// Hostname of BOSH endpoint, used for prebinding only (called by PHP), // this must be an absolute URL $rcmail_config['converse_xmpp_bosh_prebind_url']= function($args) { return 'http://localhost:5280/http-bind';
# return sprintf('http://%s/http-bind', $args['host']);
};
// Hostname of BOSH endpoint, used by web browsers (called by Javascript code), // this can be a relative URL $rcmail_config['converse_xmpp_bosh_url']= function($args) { return '/http-bind'; };
// Hostname portion of XMPP username (bare JID), example: "example.net" $rcmail_config['converse_xmpp_hostname']= function($args) { return 'example.net';
# return $args['host'];
};
// Username portion of XMPP username (bare JID), example: "user" // if this contains @, this will only take the part before @, // and the part after @ will replace the hostname definition above. $rcmail_config['converse_xmpp_username']= function($args) { return $args['user'];
};
// XMPP password $rcmail_config['converse_xmpp_password']= function($args) { return $args['pass']; };
// Always embed chat even if prebinding is not configured or failed $rcmail_config['converse_xmpp_enable_always'] = false;
// Enable debug mode $rcmail_config['converse_xmpp_debug'] = false;
// Enable development mode $rcmail_config['converse_xmpp_devel_mode'] = false;
// Use older XMPP bind code (in case someone is having problem with // newer code using Candy Chat's prebind library) $rcmail_config['converse_xmpp_old_style_prebind'] = false;
My nginx proxy to BOSH
location /http-bind/ {
proxy_pass https://localhost:7443/http-bind/;
proxy_method POST;
proxy_buffering off;
tcp_nodelay on;
}
sorry proxy_pass http://localhost:5280/http-bind/;
OK, your config is pretty ordinary. from your error message, this probably has something to do with your BOSH endpoint. can you try using Pidgin to connect to BOSH endpoint?
Yep, i can connect via pidgin, also jappix mini works well
Can you provide me with BOSH logs? preferably from Roundcube login, until the error occurs. I just commited TROUBLESHOOTING.md if you need help getting BOSH logs.
Also, what is the XMPP server you are using?
openfire
It show that all ok, any 404 or 500 error, but it not login without any errors, and shows again login page I've already used developer tool as in firefox and chrome
in XmppPrebind.php, can you try changing the function:
private function sendInitialConnection() {
$domDocument = $this->buildBody();
$body = self::getBodyFromDomDocument($domDocument);
$waitTime = 60;
$body->appendChild(self::getNewTextAttribute($domDocument, 'hold', '1'));
$body->appendChild(self::getNewTextAttribute($domDocument, 'to', $this->jabberHost));
$body->appendChild(self::getNewTextAttribute($domDocument, 'xmlns:xmpp', self::XMLNS_BOSH));
$body->appendChild(self::getNewTextAttribute($domDocument, 'xmpp:version', '1.0'));
$body->appendChild(self::getNewTextAttribute($domDocument, 'wait', $waitTime));
return $this->send($domDocument->saveXML());
}
to:
private function sendInitialConnection() {
$domDocument = $this->buildBody();
$body = self::getBodyFromDomDocument($domDocument);
$waitTime = 60;
$body->appendChild(self::getNewTextAttribute($domDocument, 'hold', '1'));
$body->appendChild(self::getNewTextAttribute($domDocument, 'to', $this->jabberHost));
$body->appendChild(self::getNewTextAttribute($domDocument, 'xmlns:xmpp', self::XMLNS_BOSH));
$body->appendChild(self::getNewTextAttribute($domDocument, 'xmpp:version', '1.0'));
$body->appendChild(self::getNewTextAttribute($domDocument, 'wait', $waitTime));
error_log($domDocument->saveXML());
$return = $this->send($domDocument->saveXML());
error_log($return->saveXML());
return $return;
}
and paste the output from your web server log here.
as i undestood it will show error if it exist to browser?
it doesn't change anything in regards with browser, it won't fix your problem. but it will send debug output to your web server error log.
After adding code that was provided by you i'ge got 500 error again
*7180 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined method DOMElement::saveXML() in /hosting/mail.encryptsend.com/roundcubemail/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 310" while reading response header from upstream, client: 88.208.1.136, server: mail.encryptsend.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "mail.encryptsend.com"
sorry, there was a bug, I fixed it on my post above. please try again now.
Can we contact via skype or other?
Now your part of code works and i got this error, when tried to connect via converse
013/11/25 14:28:36 [error] 16158#0: *10991 FastCGI sent in stderr: "PHP message: <?xml version="1.0" encoding="UTF-8"?>
Now it shows 400 error. please tell how i can solve it.
Hi, Sorry for leaving this for so long.
There should be two lines in your error log, one for outgoing stanza and one for incoming.
I will have intermittent internet access for this few weeks. For fast solution, if possible, can you set me up a virtual server with your Roundcube installation? With all necessary permissions for debugging. You can contact me at priyadi@priyadi.net.
Hello, I just want to report the same issue pkutishchev : "Call to a member function getAttribute() /usr/share/roundcubemail2/plugins/roundcube-converse.js-xmpp-plugin-master/php/xmpp-prebind-php/lib/XmppPrebind.php on line 127.." One thing that I've discovered , I'm getting this error if I use non-conventional directory for my roundcube, ie /usr/share/roundcubemail2 instead of /usr/share/roundcubemai . When I changed to /usr/share/roundcubemail I didn't get php fatal error any more.
But, other things still doesn't work. I can't log in to IM server. So far I tried with ejabberd, openfire. Bosh works for me, i was able to connect through pidgin and bosh enabled. When I tried with ejabberd , it shows that I'm connected, somehow, but with red letters "disconnecting" under converse window... I can't add any other party to chat.... etc With openfire is even worst situation, it shows that I'm disconnected every time when i;m logged in to roundcube.
Regards, Borko
@borkoz can you try renaming the plugin directory from "roundcube-converse.js-xmpp-plugin-master" to "converse"?
@priyadi I created symbolic link converse to "roundcube-converse.js-xmpp-plugin-master". Now I moved to converse and problem remains : PHP Fatal error: Call to a member function getAttribute() on a non-object in /usr/share/roundcubemail2/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 127, referer: http://..........
Hi, please follow debugging instruction in TROUBLESHOOTING.md, if your converse.js at least appears, there should be some communication between browser and server.
When it configured as needed it caused down my rouncube, when install is clean, it unable to connect to my server.
[20-Nov-2013 20:27:07] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /hosting/mail.encryptsend.com/roundcubemail/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 589 [20-Nov-2013 20:27:07] PHP Fatal error: Call to a member function getAttribute() on a non-object in /hosting/mail.encryptsend.com/roundcubemail/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 127