I'm trying to run a program within a PHP script
This program converts a word doc to text. When run on a command line this works no problem
antiword word.doc > word.txt
When run in a PHP script using the system or exec or `` functions the program doesn't work
system("antiword word.doc > word.txt");
The word.txt file is created but it is empty
-rw-r--r-- 1 nobody www 0 Mar 10 11:11 word.txt
The program is definately running. I try wrapping the command in a bash shell script which then calls antiword, still doesn't work.
system("conversion.sh word.doc word.txt");
#!/bin/bash
conversion.sh
antiword $1 > $2
Anybody know of any bugs with file redirection in PHP. Definately possible that a bug exists in antiword but I really have nfc. Strange that everything works file on the command line but not using the system functions????????????
cheers