Jump to content

Executing shell command...


JimMace

Recommended Posts

I have a command line application that runs a wildland fire simulation that I tried to execute from a PHP page.  I have successfully been able to accomplish this from my laptop running fedora 5/PHP 5/Apache 2.2.2.  I tried to copy this over to a similar installation on a lab server, in my office, but I was getting some permissions errors.  I moved all of my configuration files to my html directory in Apache thinking that the problem was that Apache was trying to execute the application and it did not have sufficient permissions in the original directory.  I tried to run the page again, but, this time I get a return status of 0, which is supposed to mean success, but the application never runs.  I verified this by looking at my running processes and then application was not there.  I am using the exec () method passing in the following string "farsite4 /var/www/html/farsite/ashley/Input/ashley_cl_settings.txt 2>&1".  Now, if I run this string in my shell as root it works just fine and runs the simulation.  I have also ran the chmod command on my farsite directory recursively with the value of 0777, but still no dice.

 

Can someone please please throw me a bone.  I am new to Linux and Apache, so please be kind... :-)

Link to comment
https://forums.phpfreaks.com/topic/39420-executing-shell-command/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.