I'm not much of an NT expert, so forgive me if this is a silly question.
But if the regular internet user doesn't have rights, and I make a web page
to do these functions, how do I get at it via the internet as a different
user that does have rights?  Do you have to be sitting at the machine to
take advantage of the extension?

Thanks,
Rick

-----Original Message-----
From: David Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 9:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] IIS Manipulation


Richard,

I didn't test it but I would imagine that as long as your server is
configured correctly, the box (or site) IUSR account wouldn't have the
necessary priveledges to do anything chaotic. I didn't test that, so might
be worth testing.

If for some reason it does work (again I'd be surprised if it did), you
could probably set up something funky like a single site that has a .php
extension bound to a different php.exe that calls a different .ini file (if
this is possible under windows, under linux I'm sure you can just
o  -c<path>       Look for php.ini file in this directory) which has the
settings for the IIS stuff contained in that. This way you've only got one
site (which you can lock down with IP restrictions or whatever) that can
access the DLL.

--dave


----- Original Message -----
From: "Richard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 12:36 AM
Subject: RE: [PHP-WIN] IIS Manipulation


> How are these functions controlled?  Like, if I install this dll, will
> anyone with a site on my server be able to use these functions?  Are there
> any restrictions as to how they can be used?
>
> Thanks,
> Rick
>
> -----Original Message-----
> From: David Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 11, 2001 1:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] IIS Manipulation
>
>
> With the absence of any ADSI interface for PHP (and a COM implementation
> that seems dodgy, at least for me and the others that have tried it), I'd
> sort of given up thinking about using PHP for IIS manipulation and had
> resigned myself to a fate of VBScript for anything I needed to do.
>
> I'd noticed there's a DLL that comes with the latest distribs of PHP
called
> php_iisfunc.dll, which I'd always wondered what it did. Whilst looking at
> the zend.com site today, I found a list of undocumented functions
> (http://www.zend.com/phpfunc/nodoku.php), which makes reference to these
> functions.
>
> Because noone has done it yet (unless I've missed it) I thought I'd just
> spam some quick information about some testing I did with them.
>
> ----------------
>
> string iis_GetScriptMap(string id, string virtualPath, string extension)
>
> Returns IIS script mappings for a site.
>
> eg:
>   echo iis_GetScriptMap(iis_GetServerByComment("srvName"), "", ".asp");
> returns:
>   .asp,F:\WINNT\System32\inetsrv\asp.dll,1,GET,HEAD,POST,TRACE
>
> ----------------
>
> int iis_AddServer(string Path, string Comment, string ServerIP, int
> ServerPort, string HostName, int ServerRights, int StartServer)
>
> Adds a server to the IIS Metabase with the supplied parameters.
>
> eg:
>   iis_AddServer("f:\\", "comment","130.102.1.1", 80,"hostname", 0,1);
>
> Creates a new server with a hostheader name "hostname". Returns the Server
> Instance ID for the created server.
>
> ----------------
>
> int iis_GetServerByComment(string comment);
> int iis_GetServerByPath(string path);
>
> Returns the server instance ID for the server with the comment (ie, the
name
> that appears in MMC). This ID can then be passed to some of the other
> functions (as done below).
>
> eg:
>   iis_GetServerByComment("Default Web Site");
>   iis_GetServerByPath("f:\inetpub\wwwroot");
> Returns:
>   Using 'Default Web Site' as the comment should return 1.
>
>
>
> ----------------
>
> int iis_StopServer(int serverID);
>
> Stops a particular server
>
> eg:
>   iis_StopServer("Default Web Site");
> Returns
>   1 on success, 0 on failure, I _think_ - however, I couldn't get this
> function to work.
>
> I'm not sure of the difference between this one and iis_StopService. I
would
> have thought StopService would stop the whole webservice, but it seems to
> take a serverID parameter. Shrug.
>
> ----------------
>
> int iis_StartServer(int serverID);
>
> Starts a particular server
>
> eg:
>   iis_StartServer("Default Web Site");
> Returns
>   1 on success, 0 on failure, I _think_. That is, the function returned 1
on
> one site that I'd stopped, and successfully restarted it. However, I
> couldn't make it restart the 'Default Web Site', yet it still returned 1.
> Shrug.
>
> ----------------
>
> int iis_RemoveServer(int serverID);
>
> eg:
>   iis_RemoveServer(iis_GetServerByComment("comment"));
> Returns
>   1 on success, -602 on failure (if I made up a fake comment)
>
> ----------------
>
> There are also the following, which return values that I didn't try to
> figure out (laziness), and take a 2nd parameter (referred to in the source
> as string VirtualPath) that I also didn't figure out (also laziness):
>
> iis_getdirsecurity(iis_GetServerByComment("website"), "");
> iis_GetServerRight(iis_GetServerByComment("website"), "");
> iis_GetServiceState(iis_GetServerByComment("website"));
>
> Sorry about the poor documentation, but its better than what is on the PHP
> site :)
>
> I'm not sure how stable/reliable these are. I had a quick look through the
> source but I'm not familiar enough with the metabase functions that are
used
> to know whether or not its done in the most stable way. I know though that
> I've had enough problems with metabase corruption on servers that have
only
> ever been administered through MMC to be wary when trying 3rd party
products
> to do a similar thing.
>
> --dave
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to