Forum

> > CS2D > Servers > Webinterface
Forums overviewCS2D overview Servers overviewLog in to reply

English Webinterface

13 replies
To the start Previous 1 Next To the start

old Webinterface

Marcell
Super User Off Offline

Quote
Hi... i installed webinterface successfully, BUT
when i want to start server FROM webinterface its not working...
i can start server from shell.. .but here no:/
i add chmod to remote.php and of course cs2d_dedicated...

any suggestion?:/

old Re: Webinterface

oxytamine
User Off Offline

Quote
Remember - CS2D Web-Interface is not for hosting servers at home! However, did you install screen? What OS are you using? Did you try nohup?

old Re: Webinterface

Marcell
Super User Off Offline

Quote
no, no...

this server have an another pc, which running on Ubuntu Server 12.04...

old Re: Webinterface

oxytamine
User Off Offline

Quote
Ubuntu is bad server OS (just telling you), it's more like desktop version. However, Ubuntu was based on Debian so this will work for you.
1
apt-get install screen
If you haven't changed anything in code, CS2D Web-Interface runs servers using screen (package) by default.

old Re: Webinterface

Marcell
Super User Off Offline

Quote
no... ubuntu is good because its a debian...:)
but anyway i cant install screen becuase i havent got monitor for that computer...and thats pc have low performance for desktop

old Re: Webinterface

oxytamine
User Off Offline

Quote
user Marcell has written
no... ubuntu is good because its a debian...:)

It's Debian-based OS. Ubuntu is desktop OS, Debian is server OS. It's just that Ubuntu was not originally made to be run on servers. For example - Ubuntu is not stable, while Debian is very conservative about its packages.
user Marcell has written
but anyway i cant install screen becuase i havent got monitor for that computer...and thats pc have low performance for desktop

Connect to your server via SSH. If you use Windows, use SSH Secure Shell (client, it's free).

old Re: Webinterface

oxytamine
User Off Offline

Quote
You need to install screen in order to start servers directly from web-interface. Or you can append this fix.
1
$exec = "nohup ".$_SESSION['curserv']['dir']."cs2d_dedicated -name '".iconv('UTF-8', 'ISO-8859-1', $_SESSION['curserv']['name'])."' -port ".$_SESSION['curserv']['port']." -maxplayers ".$_SESSION['curserv']['maxpl']." -rcon '".$_SESSION['curserv']['rcon']."' 2> /dev/null > /dev/null &";
This will start server using nohup instead of screen. All the values are taken from CS2D Web-Interface so that will work. Also this fixes problem with special symbols (with iconv PHP function). Make sure that database tables are using UTF-8, if you want that to work. Consider installing phpMyAdmin if you're new to Linux.

old Re: Webinterface

ohaz
User Off Offline

Quote
The programm "screen" is not a tool to make displays working. It has nothing to do with a monitor or graphics. Screen just gives you the possibility to "detach" programms, so that they run in background. So you can safely install screen

old Re: Webinterface

oxytamine
User Off Offline

Quote
Ah, misunderstanding. Yes, "screen" is a program that emulates multiple console "windows". Through a few special keystrokes, you can create new windows and switch to them at will. That allows you to start many CS2D servers at once.

old Re: Webinterface

Marcell
Super User Off Offline

Quote
user oxytamine has written
You need to install screen in order to start servers directly from web-interface. Or you can append this fix.
1
$exec = "nohup ".$_SESSION['curserv']['dir']."cs2d_dedicated -name '".iconv('UTF-8', 'ISO-8859-1', $_SESSION['curserv']['name'])."' -port ".$_SESSION['curserv']['port']." -maxplayers ".$_SESSION['curserv']['maxpl']." -rcon '".$_SESSION['curserv']['rcon']."' 2> /dev/null > /dev/null &";
This will start server using nohup instead of screen. All the values are taken from CS2D Web-Interface so that will work. Also this fixes problem with special symbols (with iconv PHP function). Make sure that database tables are using UTF-8, if you want that to work. Consider installing phpMyAdmin if you're new to Linux.



Thanks Thanks!!!
now works very well...
but now i cant stop

old Re: Webinterface

oxytamine
User Off Offline

Quote
That's what you need to paste when $radio = 3.
1
2
$pid=exec("pidof ".$_SESSION['curserv']['dir']."cs2d_dedicated");
exec("kill ".$pid);
That will work. CS2D Web-Interface is a bit outdated, so sending packets directly to the server does not work anymore. This will kill server process instead (called hard stop in CS2D Web-Interface, I suppose). Soft stop will not work anymore.
edited 1×, last 07.06.12 12:16:12 am
To the start Previous 1 Next To the start
Log in to reply Servers overviewCS2D overviewForums overview