CodingForums.com (http://www.codingforums.com/index.php)
-   Perl/ CGI (http://www.codingforums.com/forumdisplay.php?f=5)
-   -   Need help figuring out serverstring to execute .pl file. (http://www.codingforums.com/showthread.php?t=272428)

 Lengalicious 09-07-2012 12:08 AM

Need help figuring out serverstring to execute .pl file.

I have a .bat file that allows me to initiate a server with a serverstring, within the server string is -w vehicles.pl, im guessing it runs that particular pearl script on startup, however i'm trying to convert the .bat command into a serverstring I can use in PHP so I can run the server from my website with the same serverstring, I can get most of it apart from the perl script. Heres the .bat contents

Code:

@echo off taskkill /IM mysql.exe /F & taskkill /IM mysqld.exe /F & taskkill /IM arma2oaserver.exe /F & @start server_setup\xampp\mysql\bin\mysqld.exe --defaults-file=server_setup\xampp\mysql\bin\my.ini cls echo "Please wait...Loading" ping -n 10 127.0.0.1>nul server_setup\perl\bin\perl -w vehicles.pl --cleanup --world chernarus 1 dayz root 123456 "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=Saintly\config_lingor.cfg" "-cfg=Saintly\basic.cfg" "-profiles=Saintly" -name=Saintly "-mod=@DayZ_lingor;@dayz_lingor_island;@Saintly_Lingor;" -cpuCount=4 -maxMem=1578 -exThreads=7 cd server_setup\xampp & mysql_stop.bat
the bit where its running the vehicles.pl and --cleanup, I want those two things to be converted to a php compatible serverexestring with directory seperation ".DS."

On a side not i wasn't sure whether to post this in the perl or php forum, sorry.

 AndrewGSW 09-08-2012 02:47 PM

Quote:
 On a side not i wasn't sure whether to post this in the perl or php forum, sorry.
Nevertheless, you should only post in one. If it is in the wrong forum then it will be moved by a mod.

 FishMonger 09-08-2012 03:50 PM

This is not the answer you're looking for, but is the answer to the question you asked.
Code:

server_setup\path\to\php vehicles.php --cleanup --world chernarus 1 dayz root 123456

 Clareourney 10-03-2012 06:12 AM

And also do I have to change the file name to something like Example.sh? I know in perl the files must have .pl after the name.

 All times are GMT +1. The time now is 05:48 AM.