roundcube-converse.js-xmpp-plugin icon indicating copy to clipboard operation
roundcube-converse.js-xmpp-plugin copied to clipboard

Caused 500 error

Open ghost opened this issue 12 years ago • 23 comments

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

ghost avatar Nov 20 '13 15:11 ghost

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

ghost avatar Nov 20 '13 18:11 ghost

can you provide me with your config.php?

priyadi avatar Nov 21 '13 06:11 priyadi

ghost avatar Nov 21 '13 06:11 ghost

sorry proxy_pass http://localhost:5280/http-bind/;

ghost avatar Nov 21 '13 06:11 ghost

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?

priyadi avatar Nov 21 '13 07:11 priyadi

Yep, i can connect via pidgin, also jappix mini works well

ghost avatar Nov 21 '13 07:11 ghost

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.

priyadi avatar Nov 21 '13 08:11 priyadi

Also, what is the XMPP server you are using?

priyadi avatar Nov 21 '13 08:11 priyadi

openfire

ghost avatar Nov 21 '13 08:11 ghost

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

ghost avatar Nov 21 '13 09:11 ghost

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.

priyadi avatar Nov 21 '13 10:11 priyadi

as i undestood it will show error if it exist to browser?

ghost avatar Nov 21 '13 10:11 ghost

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.

priyadi avatar Nov 21 '13 11:11 priyadi

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"

ghost avatar Nov 22 '13 13:11 ghost

sorry, there was a bug, I fixed it on my post above. please try again now.

priyadi avatar Nov 23 '13 05:11 priyadi

Can we contact via skype or other?

ghost avatar Nov 23 '13 10:11 ghost

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:

" while reading response header from upstream, client: 88.208.1.136, server: mail.encryptsend.com, request:"GET /?jid=test%40chat.encryptsend.com&password= HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "mail.encryptsend.com", referrer: "https://mail.encryptsend.com/?jid=test%40chat.encryptsend.com&password="

ghost avatar Nov 25 '13 14:11 ghost

Now it shows 400 error. please tell how i can solve it.

ghost avatar Nov 26 '13 12:11 ghost

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 [email protected].

priyadi avatar Dec 02 '13 06:12 priyadi

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 avatar Jan 05 '14 23:01 borkoz

@borkoz can you try renaming the plugin directory from "roundcube-converse.js-xmpp-plugin-master" to "converse"?

priyadi avatar Jan 06 '14 17:01 priyadi

@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://..........

borkoz avatar Jan 07 '14 08:01 borkoz

Hi, please follow debugging instruction in TROUBLESHOOTING.md, if your converse.js at least appears, there should be some communication between browser and server.

priyadi avatar Jan 22 '14 13:01 priyadi