Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

can we use PGP with PHP?

can we use PGP with PHP?..

Answer / rakesh kumar nautiyal

We would recomend using GnUPG not PGP, GnUPG can be used for
comercial sites without a license.

You will need shell access, i.e. telnet or SSH. SSH is more
secure. Also a linux machine and a copy of PGP installed on
your machine. You will also need to generate a key pair,
this consists of a public and private key. The public key is
uploaded to the server the private key is kept on your
machine. See the PGP help file for more information.

GnUPG must be installed, (Check with your server admin)

Access the shell as your user then do the following command :-
mkdir .gnupg
chmod 777 .gnupg
gpg --gen-key

use a dummy name and when it gets to the bit where it
generates the keys make sure the machine is doing I/O to get
the entropy.. ie. telnet in again and do a du / or something
its best to have this ready and just hit enter as you finish
the key creation

This creates a dummy key pair, this is not used but is needed.

This takes anything from a few seconds to a few minutes
depending on the speed of the server.

as the user, just ftp the ascii public key to the server.
This will be called something.asc. Upload it making sure its
ASCII not binary (See your FTP software help file)

then type ..

gpg --import file.asc

Then ..

gpg --list-keys

get the name of the new key that was uploaded, this will be
something like :-
pub 1024D/FA46F142 2000-11-03 Darren Casey

The next part is to set the permissions for the .gnupg
directory so the webserver can access the files. Type the
following commands :-

cd .gnupg
chmod 666 trustdb.gpg
chmod 604 secring.gpg
chmod 604 random_seed
chmod 644 pubring.gpg

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More PHP Interview Questions

i have saved the password in encrypted format in database. now i want how to retrive the password in decrypted format.

6 Answers  

How to retrieve the original query string?

0 Answers  

How do I find out the number of parameters passed into function9?

0 Answers  

Does php support multithreading?

0 Answers  

Tell me how a constant is defined in a php script?

0 Answers  

What are the final class and final method?

0 Answers  

What are the different types of array in php?

0 Answers  

What is the maximum size of a file that can be uploaded using PHP and how can we change this?

4 Answers  

How can we create a database using php?

0 Answers  

What is php mean?

0 Answers  

What is the use of get and post method in php?

0 Answers  

What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?

1 Answers