so i got a problem with my converse js,i want to use single session support,with help of server side code xmpp prebinding(php),but in my binding code it turns out i got the error,
here’s my serverside code(bind.php):
error_reporting(E_ALL);
ini_set(‘display_errors’, 1);
include ‘xmpp-prebind-php/lib/XmppPrebind.php’;
include ‘config.php’;
$xmppPrebind = new XmppPrebind($server, $boshUrl, ‘conversejs’, false, true);
$xmppPrebind->connect($username, $password);
$xmppPrebind->auth();
$sessionInfo = $xmppPrebind->getSessionInfo(); // array containing sid, rid and jid
header(‘Content-Type: application/json’);
echo json_encode($sessionInfo);
and here’s the problem :
Uncaught XmppPrebindConnectionException: Child not found in response from server. in /var/www/html/converse.js/bind/xmpp-prebind-php/lib/XmppPrebind.php:171 Stack trace: #0 /var/www/html/converse.js/bind/prebind.php(10): XmppPrebind->connect(‘admin1’, ‘xxxx’) #1 {main} thrown in /var/www/html/converse.js/bind/xmpp-prebind-php/lib/XmppPrebind.php on line 171
and lastly my converse.initialize :
converse.initialize({
prebind: true,
prebind_url : “bind/prebind.php”,
keepalive:true,
authentication:‘prebind’,
jid : ‘<?php echo $username."@".$server; ?>’,
debug: true,
bosh_service_url: ‘<?php echo $boshUrl; ?>’,
auto_list_rooms: true,
auto_subscribe: false,
hide_muc_server: false,
i18n: locales.id, // Refer to ./locale/locales.js to see which locales are supported
show_controlbox_by_default: true,
xhr_user_search: false,
auto_reconnect: true,
play_sounds: true,
message_storage : ‘local’,
message_archiving: ‘always’,
});