Cannot encrypt/decrypt zip-Files correctly (Andreas)
Tue Jun 4 23:50:02 2002
> Since you're working with an uncompressed file, skip the gzip step and
> let gpg manage the compression for you. [We've been discussing this a
> bit on the list, in fact.] In fact, I see below that you're spitting out
> the mysqldump output, so just hand the stream to gpg for the same reasons.
But later I will use gzip for better comression, donīt I? Because Itīs a
realy big amount of data, and I have to store dumps from ervery day vor 30
days, and in my PHP-script I always send me the actual mysql-dump for
security reasons, and that should be encrypted - you see?
% That creats the file 'data.gpg', which I can decrypt an my PC. On PHP this
should look something like this:
% system( "gzip -c file.htm | gpg -o
/path/to/file/data.gpg -e --default-recipient andreas");
>... you've neglected an important part: when the php script is run, it's
> run by the web server, and the web server is not you, and so gpg has no
> home directory, no keyrings, and no keys.
Yes, but mysqldump und gzip also have no homedirectory, and that working
fine! And the keyrings, how should I include them? If the path to the
keyring is like that: /www/path/to/pubring.gpg how can I build this in my