Jump to content

Php/web Programming Noob/running Executables


QuoVadis

Recommended Posts

Hi all. First post in these forums. I am an experienced C/C++/Java/C# programmer but have never done any web development. I have a pretty basic question about running executables on a server via php. I gather this is not a good idea, basically. I have some (large-ish) programs written in C that I would like to execute and get the results into a browser. Is there a 'safe' way of doing this? I would really rather not reimplement my programs in php if I can possibly avoid that.

If the executable name or any parameters that will be passed are supplied by the user, then you have potential security issues. You must validate all user supplied data to make sure it is expected and acceptable.

 

Keep in mind that your hosting provider may put restrictions on you that either prevent running executables, or require them to be in a "safe directory" or limit the CPU or memory resource usage.

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.