Cannot encrypt/decrypt zip-Files correctly (Andreas)
akorthaus@web.de
akorthaus@web.de
Tue Jun 4 23:10:02 2002
This is a multi-part message in MIME format.
------=_NextPart_000_0213_01C20C1D.32E4DE40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
[sorry, I used wrong mailadress before - this one is correct]
Hallo!
First of all sorry, because did not get along with such a mailing-list =
at once, but with help from David T-G I think I can manage it now - I =
hope so.=20
I=B4ve found the solution to my problem mentioned befor more or less by =
myself. I tried to decrypt a zip-file with WinPT by clipboard, but I had =
to use the WinPT filemanager. Now it=B4s really easy ;-)
But now I=B4ve the next problem, is here someone knowing about a =
php-function like system()?=20
What I=B4m trying at all is to get a mysqldump gzipped and encrypted by =
GPG, and all from a php-script. The problem, I=B4ve got the full command =
therefore made on the command-line, it works very fine! But I don=B4t =
get the part running, which encrypts the output of gzip and saves that =
file. I=B4ve build a command that makes the dump and compresses the =
file as gzip and saves it. This also works with php-funktion system() =
very well. but the second part doesn=B4t:
=20
For command-line the 2nd part is working correctly in this way: gzip =
-c file.htm | gpg -o data.gpg -e --default-recipient andreas
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");
?>
But that does nothing. A working example in php would be the 1st part:
<?
system ("mysqldump -uxxxxx -pxxxxx -hxxxxx database | gzip > =
/path/to/file/dump.gz");
?>
That creats a nice dump of the Database, which is compressed with gzip.=20
Sorry for my bad english, I hope you undestand what my problem is! =
Perhaps someone can help me!
Thank you very much!
Andreas
------=_NextPart_000_0213_01C20C1D.32E4DE40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>[sorry, I used wrong mailadress before =
- this one=20
is correct]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hallo!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>First of all sorry, because did not get =
along with=20
such a mailing-list at once, but with help from David T-G I =
think I=20
can manage it now - I hope so. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I=B4ve found the solution to my problem =
mentioned=20
befor more or less by myself. I tried to decrypt a =
zip-file with WinPT=20
by clipboard, but I had to use the WinPT filemanager. Now =
it=B4s really=20
easy ;-)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>But now I=B4ve the next problem, is =
here someone=20
knowing about a php-function like system()? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What I=B4m trying at all is to get a=20
mysqldump gzipped and encrypted by GPG, and all from a php-script. =
The=20
problem, I=B4ve got the full command therefore made on the =
command-line, it=20
works very fine! But I don=B4t get the part running, which encrypts =
the=20
output of gzip and saves that file. I</FONT><FONT face=3DArial =
size=3D2>=B4ve build a=20
command that makes the dump and compresses the file as =
gzip and=20
saves it. This also works with php-funktion system() =
very well. but=20
the second part doesn=B4t:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>For command-line the 2nd part is =
working correctly=20
in this way: gzip -c file.htm | gpg -o data.gpg -e=20
--default-recipient andreas</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>That creats the file 'data.gpg', which =
I can=20
decrypt an my PC. On PHP this should look something like =
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>system( "gzip -c file.htm | gpg -o =
/path/to/file/data.gpg -e --default-recipient andreas");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>?></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>But that does nothing. A working =
example in php=20
would be the 1st part:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>system ("mysqldump -uxxxxx -pxxxxx =
-hxxxxx database=20
| gzip > /path/to/file/dump.gz");<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>?></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>That creats a nice dump of the =
Database, which is=20
compressed with gzip. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Sorry for my bad english, I hope you =
undestand what=20
my problem is! Perhaps someone can help me!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you very much!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial =
size=3D2>Andreas</FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_0213_01C20C1D.32E4DE40--