Running cli editor from php

I'm trying to run vim from the command line to edit database records using php.

However, both passthru() and system() both seem to not assign STDIN of the process to my console. Is it possible to do this? STDERR seems fine, as I do get a "Vim: Warning: Output is not to a terminal".

Bad Gateway is Toronto-based team of software engineers. We build good APIs and websites.

Want to work with me on your next project?

Email us

Web mentions


  • Noch


    system("vim > `tty`");
  • Evert


    Thanks man! That did the trick :)