Should it be possible to put an exe file on an apache server, send a text file via a php form, have the exe process the text file and then send the results back to the client?
Or is this generally not possible (if so, why)?
I looked around a bit but I havent really gotten a conclusive answer. Some say you should use the exe as a cgi script and some say it's only possible on a windows server.
Thanks!
EDIT
My code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<?php
echo exec('whoami');
echo exec("my.exe");
echo "<h1>Success</h1>";
?>
</body>
</html>
Works locally. Should this also work on an apache server hosted by a webspace company? (provided that they didn't prohibit exec).