![]() |
Run .exe file from ci3 in IIS server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: Run .exe file from ci3 in IIS server (/showthread.php?tid=80160) |
Run .exe file from ci3 in IIS server - programozas - 09-21-2021 Code: I want to run an .exe program from Codeigniter 3 on an IIS server, but it doesn't do anything. Does anyone know how to configure the IIS server so that I can start an .exe program? RE: Run .exe file from ci3 in IIS server - includebeer - 09-21-2021 To get a literal backslash and not to escape a character, you need to double the backslahes: PHP Code: <?php RE: Run .exe file from ci3 in IIS server - programozas - 09-22-2021 (09-21-2021, 03:36 PM)includebeer Wrote: To get a literal backslash and not to escape a character, you need to double the backslahes: RE: Run .exe file from ci3 in IIS server - includebeer - 09-22-2021 There may be other problems, but the problem with your path was the first of them... I don't see your error message. RE: Run .exe file from ci3 in IIS server - programozas - 09-24-2021 I solved ! <link rel="shortcut icon" href="#"> <?php //phpinfo(); error_reporting(E_ALL); $output=null; $retval=null; //exec('c:\inetpub\vhosts\programozas.org\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE C:\TMP\VALASZ.TXT', $output, $retval); exec('..\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE C:\TMP\VALASZ.TXT', $output, $retval); //exec('dir',$output,$retval); echo "Returned with status $retval and output:\n"; print_r($output); ?> -Must use IUSER in IIS Which is a huge lesson for me: 1.I was expecting the exe to physically start, but since this is a server here nothing physical is running! 2. My program was expecting parameters and I did not specify them, the above code will help to highlight this. After giving the parameters also the exe no longer wrote an error message. 3.I saw the run as working by getting an answer.txt t in the c: \ tmp directory that contained the tokenxchage of the online account. |