I have a C ++ executable "skypeforwarder". skypeforwarder works if I use the command line in the terminal on Mac: henry $ / Users / henry / Desktop / skypeForwarder / skypekit-sdk_sdk-4.1.2.20_793394 / examples / cpp / tutorial / step3 / skypeForwarder
sh: /Users/henry/Desktop/skypeForwarder/skypekit-sdk_sdk-4.1.2.20_793394/examples/cpp/tutorial/step3/skypeForwarder: Permission denied
But it always issued "allowed permission" if it was called in php exec ();
<?php
echo exec('whoami');
$output = null;
$execBuild = '/Users/henry/Desktop/skypeForwarder/skypekit-sdk_sdk-4.1.2.20_793394/examples/cpp/tutorial/step3/';
$execBuild .= 'skypeForwarder';
$n = exec($execBuild, $output);
I searched a lot. The problem should be the php / browser resolution issue on the web server. I also tried changing the owner of the file:
-rwxr-xr-x 1 henry staff 1212716 19 Apr 11:23 skypeForwarder
to
-rwxr-xr-x 1 _www staff 1212716 19 Apr 11:23 skypeForwarder
It still doesn't work.
I installed apache in my mac according to http://foundationphp.com/tutorials/php_leopard.php
source
share