sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
338 stars 174 forks source link

CServerRcon.php: expects parameter 1 to be resource, boolean given in #105

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello I have a big problem with SourceBans

[Server Specs] Apache/2.4.12 (Ubuntu) Database client version: libmysql - 5.6.27 PHP extension: mysqli Documentation PHP version: 5.6.11-1ubuntu3.1 OS Ubuntu 15.10

I dont know why i have AJAX error when i want ban,kick someone from web panel BTW SourceBans web rcon console doesnt work (Can't connect to the server)

I tried SourceBans 1.5.3 and 1.5.4 same problem

Error: the XML response that was returned from the server is invalid. Received: Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 50

Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 71

Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 71 $('dialog-control').setStyle('display', 'block');

sarabveer commented 8 years ago

Try this: CHMOD the following files/folders to 777: /config.php /demos /images/games /images/maps /themes_c

sarabveer commented 8 years ago

Also, what PHP version do you have?

ghost commented 8 years ago

SERVER OS = Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-25-generic x86_64) SourceBans++ 1.5.4-dev-git321 SourceMod Version: 1.7.3-dev+5286 Metamod:Source version 1.10.6

PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Server version: Apache/2.4.7 (Ubuntu)

MYSQL Server version: 5.5.46-0ubuntu0.14.04.2 (Ubuntu)

Still same error

Error: the XML response that was returned from the server is invalid. Received: Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 50

Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 71

Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/sourcebans/includes/CServerRcon.php on line 71 $('dialog-control').setStyle('display', 'block');

About chmod i had it already

ghost commented 8 years ago

I solved the problem mate ;) Just add +ip 00.00.00.00 in server startup script

sarabveer commented 8 years ago

Yea, if the server is behind a router, please use the internal ip of your server.