Eg a minimal script:
#!/usr/bin/php
<?php
# do some stuff and then drop into another interactive script:
system('something.sh');
‘something’ could be bash, binary, etc whatever and is interactive, like a sql/telnet/etc. In bash this is trivial. Is this even possibly inside php?
I’ve tried system(), exec(), passthru(), shell_exec()
proc_open() looks possible but messy to set up.
If you want to be interactive,
proc_open()is exactly what you need.If I recall correctly, it’s the only way to get at STDIO of the child process, which you will need if you are redirecting input/output.