I'm trying to execute a C++ executable from php in Windows Server 2012 R2. The php code that I have is:
<?php
$return = -1;
$file = 'helloworld.exe';
if (!file_exists($file)) echo 'File does not exists';
exec($file, $out, $return);
if($return == 0) print_r($out);
else echo "Return value: $return\n";
?>
When I try to execute it, I get
Return value: -1073741515
I am compiling the code with MinGW and when I run it from the command line it works. I've been doing some research and the only answer I could find is that my application is missing DLLs, but I couldn't find any actual solution to the problem. I don't have much experience in this field and I would appreciate any help.
Aucun commentaire:
Enregistrer un commentaire