RE: running system()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to use gpgp to encrypt and decrypt files. I can get it to work if
it's a scheduled task, as the user that's running the task isn't the web
user, but I was just wondering if there was a way to safely enable system
for a shared environment.

-----Original Message-----
From: Chris [mailto:dmagick@xxxxxxxxx] 
Sent: Wednesday, June 28, 2006 8:01 PM
To: Mark Steudel
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  running system()

Mark Steudel wrote:
> So I'm trying to run some system commands on the windows box I am working
> on. And I am getting "Unable to fork" errors. So after some googling I see
> that its because the internet guest user needs access to cmd.exe, my
> question is how safe is it to enable this on a production/shared
> environment? Anyways pointers to securely setting this up?

If it's enabled, it's enabled for everyone.

If you're calling system, make sure you use escapeshellarg and 
escapeshellcmd in the relevant places.

That's not going to protect you from other peoples bad code though..

What are you trying to use system() for? Maybe there's a built in 
function or another way to do what you need.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux