hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP Controlling Windows 2k
Reply

Forum Jump

PHP Controlling Windows 2k

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2002, 11:30 PM
KelteN KelteN is offline
Disabled
 
Join Date: Aug 2002
Posts: 4
Question

PHP Controlling Windows 2k


How would I create a php script that would be able to run certian commands on my windows 2000 server, all from a web interface control panel??? I know this is a tuf questions, but I just thought I would give it a try.



Sponsored Links
  #2  
Old 08-24-2002, 11:40 PM
sitekeeper sitekeeper is offline
Quick, poke it with a stick!
 
Join Date: Jul 2001
Location: Troy, Missouri USA
Posts: 1,299
First you should download and install phpdev5 from http://www.firepages.com.au/ you will then have the ability to learn and test php on you PC. I have been using version 4 for about 4 months and ver. 5 for about 1 month. I found it is very stable and compatible.

Beta 5 worked as soon as it was installed no problem, it includes:
apache 1.3.26
apache 2.0.39
php4.2.2
MySQL4
phpmyadmin 2.3 (RC)
AnalogX php.ini configurator
PHP-GTK 0.51
PhpWebsite

__________________
Sitekeeper
32 Mbps broadband

  #3  
Old 08-25-2002, 12:14 AM
KelteN KelteN is offline
Disabled
 
Join Date: Aug 2002
Posts: 4
K i just installed it

Sponsored Links
  #4  
Old 08-25-2002, 01:48 AM
AlCapone_yg AlCapone_yg is offline
Newbie
 
Join Date: Aug 2002
Posts: 11
.. and then just use any of the system calls

  #5  
Old 08-26-2002, 03:04 PM
KelteN KelteN is offline
Disabled
 
Join Date: Aug 2002
Posts: 4
OK, can you give me an example of a script that would execute "test.exe -text test +exec test.cfg" & be able to shut it down with a seperate command.

  #6  
Old 08-26-2002, 05:20 PM
terrastudios terrastudios is offline
Junior Guru
 
Join Date: Dec 2001
Location: Blackpool, England
Posts: 180
<?php
system("the command you wanted to run");
?>

as for the closing it, cant think of a easy way of doing this under windows, been using linux to much. ud need to grab the process id and kill it

sorry cant be much more of a help

  #7  
Old 08-27-2002, 08:58 AM
CagedTornado CagedTornado is offline
Junior Guru
 
Join Date: Jul 2001
Location: Wrapped in CAT5.
Posts: 217
Lightbulb Need proper permissions...

To be able to control aspects of Windows, you would need to make sure that the IIS user (normally 'the IIS anonymous user') has sufficient permission to execute various programs. This gets more complicated on a domain (if you wanted to automate DB creation on another box, for example) because this user must be a domain user.

Just something to keep in mind.

Dan

__________________
Dan Esparza
CagedTornado web services

  #8  
Old 08-27-2002, 09:53 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

  #9  
Old 08-27-2002, 01:28 PM
combs combs is offline
Junior Guru
 
Join Date: Aug 2002
Location: Plymouth
Posts: 212
Try System() function call.

system() is just like the C version of the function in that it executes the given command and outputs the result. If a variable is provided as the second argument, then the return status code of the executed command will be written to this variable.

Reply

Related posts from TheWhir.com
Title Type Date Posted
VMware Launches DaaS Based on vCloud Hybrid Service Web Hosting News 2014-03-10 12:34:24
Microsoft Surpasses Amazon as Largest Windows Hosting Company: Netcraft Web Hosting News 2014-02-27 17:05:44
JaguarPC Listing 2014-04-16 23:29:25
Expired SSL Certificate Brings Down Windows Azure Cloud Web Hosting News 2013-02-25 10:38:00
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?