PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I've tried using exec(), system(), passthru() and shell_exec() on a binary .exe file with PHP safemode off, however none of the commands are producing and output and therefore don't seem to be executing the file. Here's the code (ignore the complexities of the parameters). I know this command works because it outputs when run directly from a UNIX shell window, it's just when I try and run it under PHP, it doesn't output anything and doesn''t run.
you sure that's the correct file page to the exe? that'd be in the file system's root. It appears that you have redirection in there as well, which may shunt the process to a background thread..
Can you explain what you mean by correct file page? I'm a bit of a novice at running external programs through PHP. How do I check the file page on the system's root?
sorry, file path. Where is this exe located in the system directories? Where is the php file located in the system directories? Is the exe in a %PATH% location?
btw, you are redirecting all output to >&! /usr/local/www/galform/Junk/table_junk
probably, that program outputs stderr also to your console... and that is why you get to see it... might want to try whatevercommand 2>&1 to make sure stderr also is redirected to stdout....