I have a C++ executable file 'skypeforwarder'. skypeforwarder works if I use command line in Terminal in 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 'permission denied' if it is 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 problem of the php/browser permission in web server. I also tried to change the owner of the file from:
-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 does not work.
I set the apache in my mac according to http://foundationphp.com/tutorials/php_leopard.php