Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Caused 500 error #10

Open
ghost opened this issue Nov 20, 2013 · 23 comments
Open

Caused 500 error #10

ghost opened this issue Nov 20, 2013 · 23 comments

Comments

@ghost
Copy link

ghost commented Nov 20, 2013

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
Copy link
Author

ghost commented Nov 20, 2013

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

@priyadi
Copy link
Owner

priyadi commented Nov 21, 2013

can you provide me with your config.php?

@ghost
Copy link
Author

ghost commented Nov 21, 2013

No description provided.

@ghost
Copy link
Author

ghost commented Nov 21, 2013

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

@priyadi
Copy link
Owner

priyadi commented Nov 21, 2013

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?

@ghost
Copy link
Author

ghost commented Nov 21, 2013

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

@priyadi
Copy link
Owner

priyadi commented Nov 21, 2013

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
Copy link
Owner

priyadi commented Nov 21, 2013

Also, what is the XMPP server you are using?

@ghost
Copy link
Author

ghost commented Nov 21, 2013

openfire

@ghost
Copy link
Author

ghost commented Nov 21, 2013

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

@priyadi
Copy link
Owner

priyadi commented Nov 21, 2013

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.

@ghost
Copy link
Author

ghost commented Nov 21, 2013

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

@priyadi
Copy link
Owner

priyadi commented Nov 21, 2013

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.

@ghost
Copy link
Author

ghost commented Nov 22, 2013

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"

@priyadi
Copy link
Owner

priyadi commented Nov 23, 2013

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

@ghost
Copy link
Author

ghost commented Nov 23, 2013

Can we contact via skype or other?

@ghost
Copy link
Author

ghost commented Nov 25, 2013

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
Copy link
Author

ghost commented Nov 26, 2013

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

@priyadi
Copy link
Owner

priyadi commented Dec 2, 2013

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].

@borkoz
Copy link

borkoz commented Jan 5, 2014

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

@priyadi
Copy link
Owner

priyadi commented Jan 6, 2014

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

@borkoz
Copy link

borkoz commented Jan 7, 2014

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

@priyadi
Copy link
Owner

priyadi commented Jan 22, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants