Alternative command to exec

Hi,

All of the hosters I’ve tried have disabled the exec command, but I need to execute an external program from within my php code and be able to detect the return code and output messages.

So does anyone know of an alternative way of executing external programs from php code, if you aren’t allowed to use exec, system, passthru or shell_exec?

Debbie

if you don’t have access to be able to run it directly from a command prompt then you might be able to do it by setting up a cron job.

Hi oddz,

That’s why I had to come to the forums, because I had run out of ideas, so I was looking to see if anyone else had found another way to do it.

I’m trying to execute the ioncube licence generator program, which you have to execute as an external program, because it comes as a pre-compiled program.

Any suggestions of how to do this without using exec, system, passthru or shell_exec would be much appreciated.

Debbie

Yep, think of a new approach.

Its not uncommon for command line execution to not be allowed. In fact most host and companies seem to do so for security reasons to close a huge security hole.

The best thing to do is to think of another way to achieve your goal without execution of an external program through the command prompt.