Not logged in. · Lost password · Register
Forum: Support Bug reports and troubleshooting RSS
Jabber notification doesn't work..
Page:  1  2  3  next 
crazik #1
Member since Nov 2005 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Jabber notification doesn't work..
I've version 1.6.3 (up-to-date ?) and I've problem with jabber notification.
Jabber account for forum is configured properly (works with any application), but it doesn't work.

From error.log :

20.09.2006 11:44:22 - User 2 crazik - @post - xxx.xxx.xxx.xxx
Jabber error: -1
Backtrace:
  • unb/unb_lib/mail.lib.php : 174 : UnbErrorLog("Jabber error: -1")
  • unb/unb_lib/post.inc.php : 202 : UnbNotifyUser(array(1), 4, "mail.threadwatchnotify-jabber.subject", array(1), "mail.threadwatchnotify-jabber.body", array(4))
  • unb/unb_lib/post.inc.php : 588 : SendWatchNotification(object(IForum), object(IThread), object(IPost), 1, "")
  • www/unb/forum.php : 150 : require("/opt/www/unb/unb_lib/post.inc.php")
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3864 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Jabber notification code hasn't been touched for a while, so not having the latest UNB version doesn't make a difference.

Error code -1 is, let me look it up in the source code..., "Cannot connect to Jabber". This happens when the Connect() method on the Jabber connections fails. So please check your Jabber server name, probably there's a mistake in this.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
crazik #3
Member since Nov 2005 · 12 posts
Group memberships: Members
Show profile · Link to this post
my setting are correct (checked in Psi/Gaim).

hm.. maybe from another side :
My another idea is - missing php module ?
Which extension of php jabber needs ?

Forum is placed on Solaris 10, so I can't simply compare with other installations (linux).
crazik #4
Member since Nov 2005 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hm.. I think that problem is in jabber.lib.php - i've downgraded it to old version (Class.Jabber.PHP v0.4) and it works great !
Avatar
Yves (Administrator) #5
User title: UNB developer & webmaster
Member since Jan 2004 · 3864 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Okay, could be that it's the TLS extension in UNB's version of class.jaber.php. This library is subject to be replaced by another one anyway.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Ryo Saeba #6
Member since Dec 2005 · 1 post · Location: Como (Italy)
Group memberships: Members
Show profile · Link to this post
I have the same problem. Worked fine for some time, then an upgrade of the forum or an upgrade of the jabber server I was using broke it.
I'll try downgrading the class as suggested.
floele (Guest) #7
No profile available.
Link to this post
Hi.

We (that is the Flyspray project) also had a lot of problems with Jabber and we used the same library. When we searched for a solution, we realised that there is apparently no better library - at least not with all features we needed (well, we only wanted to be able to login and send messages). Thus we started writing our own Jabber lib which is finished so far and already works very well (it's also a lot faster).

You can get it here if you are interested:
http://fisheye3.cenqua.com/browse/~raw,r=1060/flyspray/tru…

Usage:
require('class.jabber2.php');

$jabber = new Jabber('floele-test@jabber.org', 'password', $use_ssl = true);
$jabber->login();
// or $jabber->register(); for a new account

// not required for sending
$jabber->presence();

$jabber->send_message('floele@jabber.org', 'my test msg', 'subject');
$jabber->disconnect();

// if something does not work, this will probably have all info I need to fix it
print_r(array_map('htmlspecialchars', $jabber->log));


Let me know if you intend to use it and / or experience problems with it.

Regards,
Florian
Avatar
Yves (Administrator) #8
User title: UNB developer & webmaster
Member since Jan 2004 · 3864 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Cool. :) I'll look into it. Do you know about the other new Jabber library for PHP4 from
http://code.blitzaffe.com/pages/phpclasses/files/jabber_cl…
Doesn't work with PHP5 though, the author is planning to do it sometime. I have this problem with another project, too:
http://beta.unclassified.de/projekte/jru-php/

What PHP versions does your library run on? 4.1, 4.3, 5.0, 5.1, 5.2? Does it require special configuration or extensions? I've seen a DNS_SRV thing, not sure if PHP can do it by default. What license is it put under? GPL, LGPL, public domain? You should probably make this more public because working PHP Jabber libraries are rare today! ;)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
floele (Guest) #9
No profile available.
Link to this post
Quote by Yves:
Cool. :) I'll look into it. Do you know about the other new Jabber library for PHP4 from
http://code.blitzaffe.com/pages/phpclasses/files/jabber_cl…

Yes. Major problem is that it doesn't support SASL either.

What PHP versions does your library run on? 4.1, 4.3, 5.0, 5.1, 5.2?

It should run on everything >= 4.3. If it doesn't let me know ;)

Does it require special configuration or extensions?

Yes. The XML extension and OpenSSL when SSL is supposed to be used.

I've seen a DNS_SRV thing, not sure if PHP can do it by default.

Required for GTalk only afaik.

What license is it put under? GPL, LGPL, public domain?

LGPL.

You should probably make this more public because working PHP Jabber libraries are rare today! ;)

Tell me how ;)
Until now I considered a sourceforge project but I don't know if it is worth it...
guest (Guest) #10
No profile available.
Link to this post
Hi,

any news on the jabber integration? I just downloaded this software (which seems very promising) and jabber functions do not seem to be working.

DNS_SRV is *very* important IMO since every real XMPP server uses it.

Please let me know of the status of jabber component for post notifications if it changes.

Thanks for your excellent software,
Eric
Rumbelstilzchen #11
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
For me Jabber-Norification works very well.

I use 20070225-dev and I have an account at jabber.org
Jugendkreis
petrosilius.de
Guest (Guest) #12
No profile available.
Link to this post
Quote by Rumbelstilzchen:
For me Jabber-Norification works very well.
I use 20070225-dev and I have an account at jabber.org
Thanks for the tip. I downloaded and installed it and it works perfectly for me as well. I had to add a line in the source for static DNS_SRV of my XMPP server though ;-)

Thanks again
floele (Guest) #13
No profile available.
Link to this post
Just FYI, there is some documentation for the library available now:

http://flyspray.org/class.jabber2.php

It got a few updates in the meantime and phpBB is using it now as well :-)
Avatar
Yves (Administrator) #14
User title: UNB developer & webmaster
Member since Jan 2004 · 3864 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Thanks, I'll look into it. It's on my plan for version 1.6.4, which has, including this, only two open issues remaining.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Yves (Administrator) #15
User title: UNB developer & webmaster
Member since Jan 2004 · 3864 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have now updated the source code to use your Jabber library. A quick test showed that it works. Let's see what other users have to say. :)

One question: From reading the source, it looks that the Jabber() constructor returns false if it can't connect to the server. In other programming languages, constructors can't have a return value but only throw exceptions instead. So I'm a little confused how I can detect a connection error. Is it correct that I can compare the new object to false to see if there was an error? This would mean that no instance would have been created.

The migration of the code wasn't much work. I replaced the library file and the rest of the changes remained inside a single function in UNB. It was just the connection stuff, the rest is nearly unchanged.

A note to those who wish to use the old Jabber library: You can just take the files jabber.lib.php and mail.lib.php from the previous development snapshot (up until 2007-05-31). Don't use the files from 1.6.3, they're older. There are no further code changes besides replacing those files. If somebody lost their files when overwriting them, I can provide a download upon request.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  3  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Page created in 194.1 ms (144.1 ms) · 125 database queries in 87.9 ms
Current time: 2014-08-30, 00:23:30 (UTC +02:00)