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 1034401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:23:08+00:00 2026-05-16T14:23:08+00:00

I am working on a script that needs to run a perl script via

  • 0

I am working on a script that needs to run a perl script via command line (using shell_exec()). To set up the script I needed to generate a GPG key on my end, and import their public key into my GPG keyring.

The perl script works fine when I run it as the ROOT user, but when running through PHP it throws this error message:

“An error occured when attempting to sign the request”

I assume this means that the GPG keys I have set up in my root user are not accessible to the user PHP is running its shell commands under (i.e. apache).

How should I go about solving this?

I don’t know if I need to login as apache and import the keys, or if there is a command to run as root to allow them to be shared to the apache user… Any ideas would be great 🙂

  • 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-05-16T14:23:09+00:00Added an answer on May 16, 2026 at 2:23 pm

    Correct. Obviously, you don’t want some mere mortal user like “apache” being able to sign things as root!

    So you’ll want to configure GPG for the apache user. This is usually painful, since the apache user typically can’t get a shell.

    I’d try setting up /home/<apache-user> directory, if it doesn’t exist (probably doesn’t). Then try setting up GPG for the apache user. You can probably get it to work as root by passing --homedir=/home/<apache-user> to the gpg binary.

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

Sidebar

Related Questions

I am working on a ZF application that needs to run a command line
I have a PHP script that needs to run from command line. One of
I'm working on a python script that needs to run between two given times.
Im working on a script that needs to find a match for certain letters(chords)
I'm working on a Python script that needs to create about 50 distinct temporary
I'm working on a DB upgrade script that needs to drop a column (that
I´m currently working on a short SED script that needs to HTML-encode parts of
I'm working on a script currently that needs to pull information down from a
I'm working with a script that is calling the same class twice and throwing
I'm working on a script that will check if a user is an Administrator

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.