shell_exec() a homemade program not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gth759k
Forum Commoner
Posts: 76
Joined: Mon Jun 15, 2009 3:04 am

shell_exec() a homemade program not working

Post by gth759k »

I have used shell_exec() in php before without any problems with ffmpeg for video conversion and also with octave for plotting graphs, but I recently made my own c program that doesn't have any bugs left in it and it executes fine from the command line but when I load the php page that is supposed to be executing my program with shell_exec() nothing happens. I've double and triple checked that my paths are right even spelled them out literally: shell_exec('/opt/lampp/htdocs/myprogram'); and everything has been chmod to have executable file permissions and I've even copied the program to /bin/ so I can just call the name of the program from wherever I am in the prompt and it works, just not through shell_exec() or exec() or system() or passthru() or anything else I've tried. Also putting something like system('ls -l') in my php files works fine. Anyone know how to fix this? Any help would be appreciated. Thanks.
Post Reply