Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 02-05-2008, 12:21 PM   #1
Mike Graziano
 
Mike Graziano's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP shell commands (exec, passthru and system) won't execute

To all,

I posted this question once before on the general PHP list; however, now
that the list has been segmented into different groups, I thought I'd try
once again.

I am a PHP newbie and am having trouble getting PHP shell commands (exec,
passthru and system) to execute. Even something as simple as

<?
system("dir c:\\");
?>

won't execute on a Webserver running NT Server 4.0 and IIS 4.0. The message
that comes back is

Warning: Unable to fork [dir c:\] in C:\Inetpub\wwwroot\mjg\test1.php on
line 2

This very same script ran on a Linux Webserver. Permissions have been set
very liberally so I don't think this is the issue. Other PHP scripts that
do not contain shell commands do execute.

One suggestion was to try either

system("command /c dir c:\\");

or

system("cmd /c dir c:\\");

Neither of these were successful and resulted in similar error.

Does any one have any ideas?

Thx in advance,

mjg ( graz@multicastisp.com ; 914-462-9084 )

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 02-05-2008, 12:21 PM   #2
Francis Smit
 
Francis Smit's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] PHP shell commands (exec, passthru and system) won'texecute



Mike Graziano wrote:

> To all,
>
> I posted this question once before on the general PHP list; however, now
> that the list has been segmented into different groups, I thought I'd try
> once again.
>
> I am a PHP newbie and am having trouble getting PHP shell commands (exec,
> passthru and system) to execute. Even something as simple as
>
> <?
> system("dir c:\\");
> ?>
>
> won't execute on a Webserver running NT Server 4.0 and IIS 4.0. The message
> that comes back is
>
> Warning: Unable to fork [dir c:\] in C:\Inetpub\wwwroot\mjg\test1.php on
> line 2
>
> This very same script ran on a Linux Webserver. Permissions have been set
> very liberally so I don't think this is the issue. Other PHP scripts that
> do not contain shell commands do execute.
>
> One suggestion was to try either
>
> system("command /c dir c:\\");
>
> or
>
> system("cmd /c dir c:\\");
>
> Neither of these were successful and resulted in similar error.
>
> Does any one have any ideas?
>
> Thx in advance,


Try the full path and name thing
i.e. my sys has "%SystemRoot%\system32\cmd.exe" in the
link/shortcut in my menu try that though I think the full
thing i.e. system("C:\\winnt\\system32\\cmd.exe dir C:\\")
on my sys.

--
Francis Smit


Knowledge By Design/OzTel
Suite 201, 683 George st
Sydney 2000 NSW
http://www.kbd.com.au

mailto:francis@kbd.com.au

Tel: +61 2 9212 1399
Fax: +61 2 9212 5727
___________________________________
m$: How can we stuff you up today?


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags:




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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does PHP embedded in an HTML page execute? rush PHP 0 07-01-2007 3:37 PM
exec() Eric VIALLE PHP 0 07-01-2007 3:31 PM
Execute a program Jose Antonio PHP 4 07-01-2007 3:15 PM
running droplet from cygwin shell-file not found joled@rcn.com Graphics in general 4 06-12-2007 12:24 AM
SQL "Commands out of sync" error from one command... Bob Database 1 06-10-2007 12:19 AM


Featured Websites




All times are GMT +1. The time now is 1:30 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98