I\'m currently working on an online program. I\'m writing a php script that executes a command in the command line with proc_open() (under Linux Ubuntu). This is my code so far:
You forgot to write a newline to the pipe, so your program will think that it got only 45 as input. Try this:
45
fwrite($pipes[0], "4"); fwrite($pipes[0], "\n"); fwrite($pipes[0], "5"); fclose($pipes[0]);
Or shorter:
fwrite($pipes[0], "4\n5"); fclose($pipes[0]);