in reply to Module works when run in a shell, but not when run as a CGI

Check $ENV{PATH} in both cases. It could be that the GPG binary isn't found, when run as a CGI.

update Corion tells me to tell you to check the permissions for the binary/paths etc. too. After all, you're running it as a different user. Also, check if the environment isn't chrooted.

Can you, for example, run `gpg --version`?

Replies are listed 'Best First'.
Re^2: Module works when run in a shell, but not when run as a CGI
by azureblue (Initiate) on Jul 20, 2007 at 10:50 UTC
    The path to the binary is explicitly set by one of the module options, so it's definitely finding the binary. However, there are differences between $PATH in a shell and $ENV{'PATH'} in the CGI, so I'll investigate that further.

    Update: Setting the path to be exactly the same made no difference.

    Update2: I do get the expected output from `/usr/bin/gpg --version`, which means I'm not being chrooted.