RE: [PHP] running system()
| From: | Mark Steudel | Date: | Thu, 29 Jun 2006 15:21:16 +0000 |
| Subject: | RE: [PHP] running system() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238922@lists.php.net to get a copy of this message | ||
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@gmail.com]
Sent: Wednesday, June 28, 2006 8:01 PM
To: Mark Steudel
Cc: php-general@lists.php.net
Subject: Re: [PHP] 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/