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

  • Home
  • SEARCH
  • 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 7843973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:43:57+00:00 2026-06-02T16:43:57+00:00

PHP – CentOS – Apache I am trying to allow users to encrypt/decrypt files

  • 0

PHP – CentOS – Apache

I am trying to allow users to encrypt/decrypt files on my site. I’ve settled on gpg as the way I’m going to encrypt/decrypt. The problem is that I need to run a shell_exec with the encryption command and it doesn’t seem to run when called from the browser. I have tried everything I can think of including giving all the folders and files involved 777 permmission, which feels wrong.

I think I can accomplish this by setting up a cronjob and a queue, but I was hoping someone knows a better solution.

These are the commands that won’t run..

gpg --yes --passphrase=[Enter your passphrase here] -c filename.txt

gpg --yes --passphrase=[Enter your passphrase here] filename.txt.gpg

EDIT: I echoed out the command I was sending to shell_exec and it runs fine from the command line. However it will not run from the browser.

  • 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-02T16:43:58+00:00Added an answer on June 2, 2026 at 4:43 pm

    try full path of gpg like /usr/bin/gpg --yes --passphrase=[Enter your passphrase here] -c absolute_path_to_file in shell_exec

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

Sidebar

Related Questions

PHP creates files with apache:apache ownership which seems to be causing issues with other
PHP 4.4 and PHP 5.2.3 under Apache 2.2.4 on ubuntu. I am running Moodle
PHP (among others) will execute the deepest function first, working its way out. For
PHP 5.2.15 I am trying to replace {date[F]} with the date function. I have
PHP - Apache with Codeigniter JS - typical with jQuery and in house lib
PHP_CodeCoverage 1.1 removed the singleton accessor for PHP_CodeCoverage_Filter that allowed our PHPUnit bootstrap.php files
PHP Array logic re-factor I'm trying to re-factor my code... This is PHP ...
PHP Redirect with Post Data Hi, I am a newbie PHP programmer and trying
PHP has a really quick way to append a value to an array: $array[]
PHP Authorize.net SIM relay url not working. Is there a way to implement the

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.