Hi there
im trying to run and excute a batch file using the exec() function but i am getting this error

Warning: exec(): Unable to fork [C:\IBserver\www\cod_start.bat] in c:\inetpub\wwwroot\xtremecp\dev\server_start.php on line 10

Does anyone know what this means because it works fine locally but not on my webserver. The actual code is below incase it helps.

<?php
$output = `cod_start.bat`;
echo "<pre>$output</pre>";
echo "Your Server Has Been Started Successfully"
?>

    Its gotta be one of two things

    1. Your webservers version of PHP differs from the one you have installed locally.

    2. You dont have permissons needed on your webserver.

    Hope this helps.

      both versions are the same but im not sure on permissions how would i change those?

        What operating system is your webserver running?

          you need to chmod a file, try giving all permissons first (777), see if that works, then remove permisssions, checking each time to see how little permissions you need.

          If you use a ftp program, have a quick look through its documentation about chmoding files, if your using telnet, get someone else to help you, i know nothing about telnet.

            i found out what is wrong now and got that solved but now when i launch the program its not launching properly because its launching in the background and i need it to launch in the foreground is there anyway to change this?

              I have absolutely no idea, anyone else got a clue?

              You will probably need to search somewhere if you can add a function to the exec() function, look on php.net's manual.

                ive searced all over the place and there was sumin about making apache interactive with the desktop so i did that but it still dont work

                  ok i have it worknig on my home computer now which is windows xp but not on my server which is windows server 2003.

                    Write a Reply...