note 126304 added to function.gnupg-import
| From: | gst at main dot php dot net | Date: | Mon, 02 Aug 2021 17:08:25 +0000 |
| Subject: | note 126304 added to function.gnupg-import | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216723@lists.php.net to get a copy of this message | ||
In case anybody tries to import keys from file and ends up with return value "false", and
absolutely no errors or warnings whatsoever.
gpg module still operates the same way as command line / bash invoked gpg.
If you are runnig a script from under apache, gpg is trying to acces it's ~/.gnupg that likely
does not exist for apache user www-data or equivalent:
# su www-data -s /bin/bash -c "gpg"
gpg: Fatal: can't create directory '/var/www/.gnupg': Permission denied
You simply need to created that folder and chown it to apache user www-data or equivalent.
# mkdir /var/www/.gnupg
# chown www-data:www-data /var/www/.gnupg
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 83.3.232.132)
----
Manual Page -- https://php.net/manual/en/function.gnupg-import.php
Edit -- https://main.php.net/note/edit/126304
Del: integrated -- https://main.php.net/note/delete/126304/integrated
Del: useless -- https://main.php.net/note/delete/126304/useless
Del: bad code -- https://main.php.net/note/delete/126304/bad+code
Del: spam -- https://main.php.net/note/delete/126304/spam
Del: non-english -- https://main.php.net/note/delete/126304/non-english
Del: in docs -- https://main.php.net/note/delete/126304/in+docs
Del: other reasons-- https://main.php.net/note/delete/126304
Reject -- https://main.php.net/note/reject/126304
Search -- https://main.php.net/manage/user-notes.php