in reply to Re^2: Module works when run in a shell, but not when run as a CGI
in thread Module works when run in a shell, but not when run as a CGI

Hi,

It looks like you are passing the wrong "path/to/key" or imported keys to wrong path. One important thing is, apache won't access the directories outside the document-root directly by default. In such case, you can try giving symbolic link under document root to the "path/to/key"

--VC

There are three sides to any argument.....
your side, my side and the right side.

Replies are listed 'Best First'.
Re^4: Module works when run in a shell, but not when run as a CGI
by azureblue (Initiate) on Jul 20, 2007 at 13:07 UTC
    OK, getting very close now. /path/to/keys is accessible and readable, but not writable (for good reason!). However, temporary files are (failing to be) created in that directory, as revealed by:
    print `/usr/bin/gpg --home /path/to/keys --list-keys 2>&1`;
    Which outputs:
    gpg: failed to create temporary file `/path/to/keys/.#lk0x91f5268.host +name.24199': Permission denied gpg: fatal: can't create lock for `/pa +th/to/keys/trustdb.gpg'
    I think I can take it from here. Thanks for the suggestions.

      Hi,

      Then create a "writable" directory in document root. put symbolic link to key ring file(s) in that directory. Give path to new directory as the path to key-ring :)

      Cheers!

      --VC

      There are three sides to any argument.....
      your side, my side and the right side.