When I look in the task manager the php.exe is running as me.  The only way that it 
doesnt work is when I run it from the web and try to get info off another server.  
Localhost works fine in all cases.  When I try to get info off another server it only 
fails when I make the request from the web site.

Try this.
Set up a site in IIS and set the directory security to NT authenticaion.  Disallow 
anonymous.
Configure PHP
Put this into a script on that site:
<?
exec("echo %username%",$output);
print_r($output);
?>

When requested from the web it displays %username%
But when run though a command line it displays charles

It seems that the shell that exec() uses doesnt have all the environment variables and 
possibly no network access?

Charles Killmer
PHP 4.2.1 IIS 5.0 Windows 2000 Server

---------- Original Message ----------------------------------
From: Scott Carr <[EMAIL PROTECTED]>
Date: Wed, 10 Jul 2002 11:34:26 -0500

Sounds like a permissions problem.  

Everywhere else you are running as you or root.  Under the Web Server, you are
probably running as "Nobody".  

Check permissions on the file you are trying to execute.
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting charlesk  <[EMAIL PROTECTED]>:

> I am trying to get php to create a DNS entry on a different server.
> 
> When I open a command shell and enter the command it works fine.  (
> (dnscmd.exe servername /EnumRecords domainname @) OR
> (dnscmd.exe IPaddress /EnumRecords domainname @)
> When I have php exec() the same command from a command line it works fine.
> (c:\php\php.exe c:\test.php4)
> When I have php exec() the same command from a web page it fails.
> (www.intranet.com/dnsinfo.php)
> 
> When servername is the local server it works fine from everywhere.
> 
> Also when I access the website I am using IIS 5.0 and NT authentication so
> the task manager shows that the php.exe is running as me. (Permision shouldnt
> be an issue)
> 
> My question is, does the exec function have network access or why isnt this
> working from a webpage?
> 
> Charles Killmer
> PHP 4.2.1 IIS 5.0 Windows 2000 Server
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

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



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

Reply via email to