GPG with PHP problem
JohnHBeasley@aol.com
JohnHBeasley@aol.com
Sun Aug 19 14:05:01 2001
--part1_98.197eea02.28b104ee_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hi,
I'm currently evaluating GPG as a product and I'm having some problems
invoking gpg commands from within a PHP script.
Currently I'm am able to encrypt files from the command line no problem
running under redhat linux (latest version) on an Apache web server but as
soon as I try the same command line via the system() command in PHP - the
file is no longer encrypted. A return code = 2 is returned by the system
command. However when I test the very same PHP script locally on my PC which
is running under Windows 2000 - gpg is invoked and the file is encrypted
beautifully.
So I then tried creating a perl script which calls gpg to encrypt a file.
This works fine under linux on the Apache web server when you call the perl
script from the command line. However when I then use a PHP script to call
the perl script to do the encryption - the perl script is invoked and runs
but once again the encryption does not take place !!! I know the perl script
is run because there are print commands displayed as part of the output !!!
I am at a loss as to what to try next. Is it a permissions thing between PHP,
linux & GPG ?
Any help would be very much appreciated as I'm getting nowhere fast.
Thanks
Christine
--part1_98.197eea02.28b104ee_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
<HTML><FONT FACE=arial,helvetica><FONT SIZE=2>Hi,
<BR>
<BR>I'm currently evaluating GPG as a product and I'm having some problems
<BR>invoking gpg commands from within a PHP script.
<BR>
<BR>Currently I'm am able to encrypt files from the command line no problem
<BR>running under redhat linux (latest version) on an Apache web server but as
<BR>soon as I try the same command line via the system() command in PHP - the
<BR>file is no longer encrypted. A return code = 2 is returned by the system
<BR>command. However when I test the very same PHP script locally on my PC which
<BR>is running under Windows 2000 - gpg is invoked and the file is encrypted
<BR>beautifully.
<BR>
<BR>So I then tried creating a perl script which calls gpg to encrypt a file.
<BR>This works fine under linux on the Apache web server when you call the perl
<BR>script from the command line. However when I then use a PHP script to call
<BR>the perl script to do the encryption - the perl script is invoked and runs
<BR>but once again the encryption does not take place !!! I know the perl script
<BR>is run because there are print commands displayed as part of the output !!!
<BR>
<BR>I am at a loss as to what to try next. Is it a permissions thing between PHP,
<BR>linux & GPG ?
<BR>
<BR>Any help would be very much appreciated as I'm getting nowhere fast.
<BR>
<BR>Thanks
<BR>Christine</FONT></HTML>
--part1_98.197eea02.28b104ee_boundary--