Reputation: 31
Is there any alternative for PHP exec(), shell_exec(), system(), passthrough() functions? As all these functions have security risk, need a way to execute server commands without using any of these functions.
Due to security reasons, can't enable these functions on my server php configuration. But as per website requirement, I need to execute some external commands like server ssh commands through php script. So, if there are any alternative ways to achieve same then please reply back to me.
Upvotes: 0
Views: 3002
Reputation: 700
You can write shell or bash scripts and invoke them through cron or set a daemon and let it check for a specific flag in database if you can do that.
Upvotes: 1