4 ms·
As a maintainer of small Wordpress and PHP forum installations I tried to use PHP for system administration scripts to avoid extra dependencies. It worked at t
by fpoling 6y ago
As a maintainer of small Wordpress and PHP forum installations I tried to use PHP for system administration scripts to avoid extra dependencies. It worked at the end surprisingly good, but only after I wrote quite a few lines of glue code to get sane behavior from PHP.
The biggest surprise was that on Linux one cannot call an external process directly. At least with PHP 7.0 one always has to use an intermediate shell and one has to use extra functions to escape strings safely.
So yes, PHP works, but defaults are insane and to make things secure and robust one has to use extra libraries.
- megous 6y agohttps://www.php.net/manual/en/function.pcntl-exec.php https://www.php.net/manual/en/function.pcntl-exec.php