PDA

View Full Version : freebsd phpbb jabber


paulfrottawa
06-07-2008, 06:05 AM
Hello I want to eventually operate a bulleten board and want to add features like jabber. I saw the name on my phpbb3 and then noticed the port jabber so I installed it and can connect to it with pidgin.

So from here I tried to connect to it from phpbb admin control panel but I get this failure.

Fatal error: Call to undefined function xml_parser_create() in /usr/local/www/phpBB3/includes/functions_jabber.php on line 776

So I'm not sure what I'm supposed to do but I found this site after noticing some one was connecting there phpbb here on other forums. Where do I get access or please help me learn to set this up thanks.

my test site is http://plusheating.dlinkddns.com/phpBB3

florian
06-07-2008, 10:56 PM
This seems to be a PHPBB3 problem. I haven't used PHPBB in ages, so I wouldn't be able to tell you what goes wrong.

However, you could post the lines from 776 here, which would allow us to debug it a bit.

paulfrottawa
06-12-2008, 03:35 AM
This seems to be a PHPBB3 problem. I haven't used PHPBB in ages, so I wouldn't be able to tell you what goes wrong.

However, you could post the lines from 776 here, which would allow us to debug it a bit.

$parser = xml_parser_create($encoding);
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $skip_white);
xml_parse_into_struct($parser, $data, $vals, $index);
xml_parser_free($parser);

$i = 0;
$tagname = $vals[$i]['tag'];

$array[$tagname][0]['@'] = (isset($vals[$i]['attributes'])) ? $vals[$i]['attributes'] : array();
$array[$tagname][0]['#'] = $this->_xml_depth($vals, $i);

if (substr($data, 0, 5) != '<?xml')
{
$array = $array['root'][0]['#'];
}

return $array;
}

/**
* _xml_depth()
* @author Hans Anderson
* @copyright Hans Anderson / http://www.hansanderson.com/php/xml/
*/
function _xml_depth($vals, &$i)
{
$children = array();

if (isset($vals[$i]['value']))
{
array_push($children, $vals[$i]['value']);
}

while (++$i < sizeof($vals))
{
switch ($vals[$i]['type'])
{
case 'open':

$tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';
$size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;

if (isset($vals[$i]['attributes']))
{
$children[$tagname][$size]['@'] = $vals[$i]['attributes'];
:more............................................. ..........there more this is just what I grapped starting from 776 line

Thanks for replying

paulfrottawa
06-24-2008, 10:58 PM
anyone have a sugestion or know of a how to somewhere?

zeller
06-24-2008, 11:07 PM
it sounds like your php is not compiled with xml parsing turned on. If you use the FreeBSD ports system, it should include an option to enable xml.

Jehan
06-25-2008, 01:01 AM
Yes, no need of the code to debug this. xml_parser_create is a function from the expat implementation in php. Yet here it says that this function is "undefined". So it means your php has probably not been compiled with the xml option, this is why it is unknown to php (because there should be no file to include, as far as I know). You must recompile php with this option, or else you won't have this xml library.

Have a look here: http://fr2.php.net/manual/en/xml.installation.php

This is simple, to get it, you must compile with the '--with-xml' option (this option is to be set during the run of the ./configure script. Or in your package manager if it supports options. Under Windows, I don't know how it works).

paulfrottawa
06-25-2008, 03:06 AM
2

I tried to do that but I don't seem to have the option here.

zeller
06-25-2008, 07:36 AM
There's a port called textproc/php5-xml, perhaps this is what you need.

Jehan
06-25-2008, 10:34 AM
Hum... I don't know this screen, hence this setup procedure, because I do all my installation usually either with my package manager, or if I compile, with the 'configure' script. Anyway here I see "Build Apache module". Do you use Apache as your web server? If so, on the page I gave previously, on can read:

"If you compile PHP as a module for Apache 1.3.9 or later, PHP will automatically use the bundled expat library from Apache."

Anyway it is also said that normally, the xml support is activated by default (though in my case, it is true it has been explicitely added).

zeller
06-25-2008, 11:41 AM
Hum... I don't know this screen
It is the FreeBSD ports configuration screen, hence why I mentioned the textproc/php5-xml port.

paulfrottawa
06-26-2008, 12:47 AM
Ok I installled textproc/php5-xml and rebooted. Thank You
The next time I entered my user info in here 4

I was now returned this.3

Should I have a special user name for the board?

zeller
06-26-2008, 01:07 AM
It looks like there is some problem with the authentication (the message says "Server does not offer SASL authentication"). You could try using port 5223, which is the legacy SSL port that old clients used.

paulfrottawa
06-26-2008, 01:22 AM
OK I tried that and here what I was returned.
5

Can the SASL authentication be turn on or is this a module I need to add in httpd.conf

paulfrottawa
06-26-2008, 04:13 AM
http://www.jabberforum.org/attachment.php?attachmentid=3&d=1214433439

The message seems to read that jabber.org (register) is the reason SASL is not authenticating. Because of the wording on the first and second line up from where it say SASL authentication.

Can I get an account at jabber.org

Jehan
06-26-2008, 10:27 AM
Hum... here especially the answer of the server is strange. When you initiate the stream, the server should answer something like this:

<stream:stream
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
id='c2s_123'
from='example.com'
version='1.0'>
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
<required/>
</starttls>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
</stream:features>


So it sends to the client all the authentication method (a list of "mechanism" in the urn:ietf:params:xml:ns:xmpp-sasl namespace) and this is up to the client to choose one it knows and begin the authentication exchange. Here it stops because the client finds nothing interesting (in fact this is worse: the server does not send any authentication method!). This is why the error message you get affirms the server does not offer SASL authentication (maybe it does but don't say it).