Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9140381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:30:33+00:00 2026-06-17T09:30:33+00:00

Inspired by http://devzone.zend.com/1278/using-gnupg-with-php/ and with help @ PHP ASCII Armored PGP encrypted string I

  • 0

Inspired by http://devzone.zend.com/1278/using-gnupg-with-php/ and with help @ PHP ASCII Armored PGP encrypted string

I was able to GnuPG-encrypt a string with a 3rd party public key when running in CLI.

  • set GNUPGHOME to world-readable location
  • chmod keyring files to 666
  • cli php encrypts the string just fine

PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

but…

I get “exit signal Segmentation fault (11)” when invoking addencryptkey running the same script through the webserver (Apache on CentOS).

apache errorl log

[notice] child pid 30682 exit signal Segmentation fault (11)

nothing of value in syslog…

any pointers? thanks!


code (nothing earth shattering):

// GnuPG code
putenv("GNUPGHOME=/opt/.gnupg/");

$gpg = new gnupg();
$gpg->seterrormode(gnupg::ERROR_EXCEPTION); 
$gpg -> setarmor(1);

try 
{
    $info = $gpg -> addencryptkey("KEY");
    var_dump($info);
    $enc = $gpg -> encrypt($token);
    var_dump($enc);
} 
catch (Exception $e) {
    echo 'ERROR: ' . $e->getMessage();
}

drwxr-xr-x  2 root root  4096 Jan 14 11:29 .gnupg

[root@dev-lamp01 opt]# ll .gnupg/
total 28
-rw-rw-rw- 1 root root 9224 Jan 14 10:23 gpg.conf
-rw-rw-rw- 1 root root  325 Jan 14 10:25 pubring.gpg
-rw-rw-rw- 1 root root    0 Jan 14 10:20 pubring.gpg~
-rw-rw-rw- 1 root root  600 Jan 14 11:29 random_seed
-rw-rw-rw- 1 root root    0 Jan 14 10:20 secring.gpg
-rw-rw-rw- 1 root root 1200 Jan 14 10:25 trustdb.gpg
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:30:34+00:00Added an answer on June 17, 2026 at 9:30 am

    oh well – my fault – as soon as I did

    chmod -R 777 
    

    on my GNUPGHOME – it all worked

    thought it was happy with 666 (and CLI was happy with just rw)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Windows keyed events for custom synchronization primitives, inspired by http://locklessinc.com/articles/keyed_events/ To support
I'm using an XMLListCollection for a spark ComboBox, inspired by this link http://blog.shortfusion.com/index.cfm/2009/4/15/FlexAS3-Custom-ComboBox-for-Countries-with-XML The
Inspired by the XKCD geohashing comic (http://imgs.xkcd.com/comics/geohashing.png), I thought I'd have a go at
My question is partially inspired by this article written by Eric Lippert: http://blogs.msdn.com/ericlippert/archive/2009/10/19/what-is-this-thing-you-call-thread-safe.aspx Using
I was quite inspired by Bret Victor's Inventing on Principle video (http://vimeo.com/36579366). Also, I
After watching Sussman's lecture http://www.infoq.com/presentations/We-Really-Dont-Know-How-To-Compute , I am inspired to give core.logic and core.match
I've been inspired by yehuda katz ( http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convince-me-to-use-vim-was-wrong/ ) to start using Vi (or
I was a bit inspired by this blog entry http://blogs.technet.com/dmelanchthon/archive/2009/07/23/windows-7-rtm.aspx (German) The current notion
This question is inspired from Joel's Making Wrong Code Look Wrong http://www.joelonsoftware.com/articles/Wrong.html Sometimes you
Inspired by http://huyrua.wordpress.com/2010/08/25/specification-pattern-in-entity-framework-4-revisited i have decided to write all nontrivial queries over specifications. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.