Current location: Hot Scripts Forums » Programming Languages » PHP » Executing commands from PHP script using exec()


Executing commands from PHP script using exec()

Reply
  #1 (permalink)  
Old 05-19-05, 09:53 AM
josephsavage josephsavage is offline
New Member
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Executing commands from PHP script using exec()

I am writing a script which takes a text document then digitally signs it using
gpg software and then emails the signed document using the mail function.

The command which I put into Linux to sign the document is as follows:


gpg --clearsign --passphrase-fd 0 /var/www/html/domains/TextFiles/athernet.co.uk.txt < /home/jamal/gnupg-1.4.1/pass.txt

athernet.co.uk.txt is the document I am signing and the file pass.txt passes a password to the command so you don't have to put the password in to use the key when you sign a document (needed to run the command from the PHP script)

I am trying to run the command from my PHP file as:

exec("gpg --clearsign --passphrase-fd 0 var/www/html/domains/TextFiles/athernet.co.uk.txt < /home/jamal/gnupg-1.4.1/pass.txt");

I think it is a problem with the exec statement? Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom php script needed alley Job Offers & Assistance 5 06-30-10 03:14 AM
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 11:17 AM
Run PHP Script Within PHP Script Reg PHP 1 06-29-04 10:09 AM
executing shell commands using php aine PHP 1 02-19-04 04:01 AM
Affiliate script (PHP) whtiebear Job Offers & Assistance 2 12-21-03 01:12 AM


All times are GMT -5. The time now is 09:15 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.