Tag Archives: php

stdin, stdout, stderr with proc_open in PHP

Want to use PHP as part of your toolchain? It’s a bit painful. If you want to pipe in some data from memory, and read it back into memory (why not! using tmp files is for wimps). here’s the solution, thanks to richard at 2006 dot atterer dot net // $command is the command to   …Continue Reading


Forcing PHP to show errors

Running PHP on a production server with no visible error messages? ┬áThis is good for security, but a real pain when debugging. Calling ini_set(‘display_errors’, 1); somewhere important does the trick. ┬áJust remember to remove it when you’re done. In my mantis install, I had to put these two lines in constant_inc.php: date_default_timezone_set(‘Australia/Melbourne’); ini_set(‘display_errors’, 1); To   …Continue Reading