Reputation: 1245
I am trying to run an executable in centos by calling it from php using the exec() command. The exe runs in the command line but when I call it through php and check from the browser it does not execute the exe. I have set the file permissions for the exe. Is there anything I need to change in the apache configuration file to enable to run an executable file?
Upvotes: 0
Views: 2812
Reputation: 1522
check the disabled_functions
string on your php.ini
and remove the exec
function if it's listed.
you can also enable-it by reseting your disabled_function
in your .htaccess
if you have one :
php_flag disable_function
edit : as @nrathaus said. if you cannot change the php.ini
file or you cannot override the settings in the .htaccess
(eg : if you have a simple website-hosting solution), you have to contact the admin of this server and ask him to enable the exec
function.
Upvotes: 2