PDA

View Full Version : real chat "Forbidden" errors


Chadi
09-25-2011, 12:03 AM
I'm suddenly getting a bunch of "forbidden" errors where the user counts should be displayed. The ONLY thing I did was restart realchat server.

www.talkjesus.com (top right and footer).

I have two related plugins for RC.

(forumhome_start)

function getAPI($command) {
$er = error_reporting(0);
$result = file_get_contents("http://xxx.xxx.127.230:8080/?api.".$command);
error_reporting($er);
return $result;
}

$apichat['currentuserlocation'] = getAPI("UserCount");
$apichat['currentusers2'] = getAPI("UsersIn=Chat%20Cafe");
$apichat['currentusers3'] = getAPI("UsersIn=Prayer%20Room");
$apichat['currentusers4'] = getAPI("UsersIn=Teen%20Hangout");
$apichat['currentusers5'] = getAPI("UsersIn=Bible%20Study");
$apichat['currentusers6'] = getAPI("UsersIn=Parents%20Only");
$apichat['currentuserfooter'] = getAPI("UserCount");


Permission (misc_start)

if ($_REQUEST['do'] == 'page' AND $_REQUEST['template'] == 'Chat')
{
if (!is_member_of($vbulletin->userinfo, 2,6,7,38,49))
{
print_no_permission();
}
}

Any ideas?

--------------- Added 1316955925 at 1316955925 ---------------

I restored the entire RealChat directory from backups. Now, the errors are gone but the output for actual number of live chat users is just blank???

Chadi
09-26-2011, 04:01 PM
I fixed all issues, except footer still won't output "members in live chat" as it used to. Not sure why.

The API / plugin is correct:

forumhome_start

function getAPI($command) {
$er = error_reporting(0);
$result = file_get_contents("http://64.64.127.230:8080/?api.".$command);
error_reporting($er);
return $result;
}

$apichat['currentuserlocation'] = getAPI("UserCount");
$apichat['currentusers0'] = getAPI("UsersIn=Chat%20Cafe");
$apichat['currentusers1'] = getAPI("UsersIn=Prayer%20Room");
$apichat['currentusers2'] = getAPI("UsersIn=Teen%20Hangout");
$apichat['currentusers3'] = getAPI("UsersIn=Bible%20Study");
$apichat['currentusers4'] = getAPI("UsersIn=Parents%20Only");
$apichat['currentuserfooter'] = getAPI("UserCount");


The room numbers are correct, double verified on my end.

The footer code is

$apichat[currentusers0] $apichat[currentusers1] $apichat[currentusers2] $apichat[currentusers3] $apichat[currentusers4]

It displays me in live chat (as I'm testing), but shows "
Chad ERR: Room does not exist. "