Hi,
Maybe stderr has additional info? Maybe this can get more info:
exec('/dir/to/file/convert.pl 2>&1', $output, $exitCode);
if ($exitCode != 0) {
trigger_error("Command failed with exit code $exitCode: \"" .
join("\n", $output) . "\".");
}
Acrobatic wrote:
Quote:
Hello
>
I've got a simple Perl script that works fine from the command line but
not from PHP via the browser. It's a conversion program that converts
an image to a different format, and writes the new image to a
directory.
>
I'm running as user "nobody" and have the target directory set to
"nobody:nobody", and I've tried chmodding the directory to both 755 and
777 with no luck. If I run my script from the command line, it executes
with no problems. In PHP, I'm using
"system('/dir/to/file/convert.pl',$retval)", but the file doesn't get
created.
>
$retval returns a 0, so I'm assuming that's a good thing.
>
In my Perl script, I added a generic "print "Hello, World"" to it, and
$retval then returns "Hello World0", so I know the script is at least
doing something.
>
Any ideas on something I'm missing? Thanks for any help or pointing in
the right direction