biobrew
11th July 2008, 02:47
I have a client who has a website on my debian etch with ispconfig server, this client has shell access and admin access.
He has a script that makes some shell calls, all of shell calls work except for one that reads a .doc file and converts into .txt file using the linux command line tool antiword
I installed antiword for him in /var/www/web1/web/bin/antiword and gave that directory and antiword www-data ownership and write and execute permissions
the files are read and written to in /var/www/web1/web/uploads
when I do:
su www-data
and run antiword from the command line it will read the .doc file and convert it into a text file just fine, e.g.
/path/to/antiword /path/to/docfile > /path/to/txtfile
And that works just fine
But using from php:
system("/path/to/antiword /path/to/docfile /path/to/txtfile");
Will in fact output a text file, but it will be 0 bytes in length.
Does that make any sense at all?
He has a script that makes some shell calls, all of shell calls work except for one that reads a .doc file and converts into .txt file using the linux command line tool antiword
I installed antiword for him in /var/www/web1/web/bin/antiword and gave that directory and antiword www-data ownership and write and execute permissions
the files are read and written to in /var/www/web1/web/uploads
when I do:
su www-data
and run antiword from the command line it will read the .doc file and convert it into a text file just fine, e.g.
/path/to/antiword /path/to/docfile > /path/to/txtfile
And that works just fine
But using from php:
system("/path/to/antiword /path/to/docfile /path/to/txtfile");
Will in fact output a text file, but it will be 0 bytes in length.
Does that make any sense at all?