I have the following exec command in php:
exec("/bin/sed -f $GLOBALS[TMP_MAIL_DIR]"."cmdfile
$GLOBALS[TMP_MAIL_DIR]"."$mailid >
$GLOBALS[TMP_MAIL_DIR]"."$mailid"."tmp",$results);

Which does a search and replace using the sed command file:
s/'/'/g
s/"/"/g

Now, executed command line, this works beautifully, the input file is parsed
and the results go to the output file - BUT when run via php, the output
file is blank, empty, no data at all.

Permissions are not the problem, I went so far as to 777 the directory and
file, still the same results.

Running PHP 4.1.2 on Linux Redhat something or another.

I am sure that it is something simple, but it is driving me crazy!

Oh, and yes, globals are on here - if I print out the exec line with the
dynamically generated paths, etc, then execute that through the terminal, no
problem.

If anyone has run into this with exec commands before or can suggest a
different way to run this command, I would love to hear it!

TIA 

--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to