Php system() problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dbrock178
Forum Newbie
Posts: 10
Joined: Sun Aug 19, 2007 1:08 am

Php system() problem

Post by dbrock178 »

Hello all,

I am currently having a problem calling certain executable files using PHP 4.4.2 and Windows XP. I am currently trying to get GPG to encrypt a file for me using PHP.

If I do system('del c:\\temp\\order.txt',$retval); I have no problem with the command executing.

If I do
system ('C:\\Program Files\\GNU\\GnuPG\\gpg.exe -r jimmy --encrypt c:\\temp\\order.txt',$retval); nothing happens.

I created a small C program using the system function to call GPG and it worked fine, but when I tried to have PHP's system function call my C program nothing happens.

Any advice as to what the problem could be?

Thank you.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I think there is a setting someplace in the IIS server configuration you have to check which says something like "allow ... to interact with the desktop".

Once you check that box it should work. You'll probably have to reboot and it doesn't really work worth a damn but that should solve your problem somewhat.
Post Reply