Strange exec() behaviour with php-win.exe (5.5.9), opens a VISIBLE intermediating CMD.exe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use PHP on my system for some tasks, since I already know the language and don't want the whole windows script baggage, so I sometimes use PHP-WIN.EXE to do some tasks.
[unimportant]One of these tasks is simply to check a file's binary header, while having the same extension,  and run it through the appropriate program.file.x opens: php-win.exe script.php path_to_file.xscript.php determines what file.x might be and opens program A if it has certain header, B if another header and so on.[/unimportant]
I had (still have but don't use) 5.2.11, this one opens programs A to Z properly... no interfering CMD window. It waits in the background for the program to finish, but that was all.
Now I have 5.5.9.0 and when I use php-win.exe I get the intermeriating CMD.exe with a visible window.
Running: exec($app1 . " \"" . $fpath . "\"") gives me:
php-win.execommand: "C:\tools\php-win.exe" "C:\tools\wrapper.php" "D:\file.x"-> child process: cmd.execommand: cmd.exe /c "C:\tools\appA.exe "D:\file.x""-> child of cmd.exe: appA.execommand: C:\tools\appA.exe "D:\file.x"
5.5.9.0 - CMD's window is visible5.2.11 - CMD's window is hidden
I know about these workarounds but they don't answer my problem:- pclose(popen("start /B ". $app1 . " \"" . $fpath . "\"", "r")); => briefly opens the cmd window and closes- $WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run...- didn't run it, but it's WScript, I want PHP only
So why and what to set or did something unsettable change in PHP's engine and there's no solution besides the workarounds? 		 	   		  

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux