/    Sign up×
Community /Pin to ProfileBookmark

exec() not working, (works from the command line)

[URL=”http://bokehman.com/tests/command-prompt.jpg”]Command line image[/URL]

The command shown creates an encrypted file but if I try to do it from exec() instead of the command line no file is created and there is no error message. Any ideas?

[code=php]echo ‘gpg -e -r Website ‘.getcwd().’GnuPG-test.txt’;
// echos: gpg -e -r Website C:AppServ5wwwGnuPG-test.txt

exec(‘gpg -e -r Website ‘.getcwd().’GnuPG-test.txt’, $result);

echo ‘<br>’; var_dump($result);[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@replicaMar 22.2007 — Is safe mode on? I hate safe mode.
Copy linkTweet thisAlerts:
@bokehauthorMar 22.2007 — It's my own server and nothing is disabled. I don't have any trouble using exec to run other commands, just this one.
×

Success!

Help @bokeh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...