View your IP Address: (none)♦MembersHelpBookmarkNewHOT110mbAlexa Ranking

Vietnamese | English

StudyInfoTechSecurityEntertainmentTourismCareerSocialBusinessScience
World Times♦Vietnam:
♦California-USA:

Exec Command of SSI



Products / Services

The exec command simply executes a program, script or a shell command on the server. It takes two formats "Exec CMD" which is used to run a command and "Exec CGI" which can be used to execute a script.

All cgi scripts should be CHMOD to 755 (or the correct execution permissions). The directory that contains the cgi script, must also be enabled for cgi scripts (your cgi-bin for example).

This executes the Unix date command.

<!--#exec cmd="/usr/bin/date" -->

This executes a CGI script called logger.pl

<!--#exec cgi="/logger.pl" -->

There are many uses for this command, one example i use is for my stats package:

<!--#exec cgi="/user-stats/stats.pl" -->

Other examples include:
<!--#exec CMD="cmd.exe /C iisreset /stop" -->
<!--#exec CMD="cmd.exe /C net start cisvc" -->

IISRESET Utility and Switches

The iisreset.exe can be used to manage web services running on a server IF you have relevant permissions.

The syntax is iisreset [computer_name] /switch [ /switch...].

The switch values can include:

RESTART Stop then restart all internet services running on the server.
START Start all internet services running on the server.
STOP Stop all internet services running on the server.
REBOOT Reboot the server
REBOOTONERROR Reboot the server if an error occurs when starting or stopping the internet services.
NOFORCE Do not force internet services to terminate if trying to stop them normally fails.
TIMEOUT:val Set the timeout in seconds for the internet services to stop.Default=20, Restart=60, and Reboot=0.
STATUS Displays the status of all internet services.
ENABLE Enables the restarting of internet services on the local system.
DISABLE Disables the restarting of internet services on the local system.

NET STOP and NET START Commands

The net.exe can be used to manage services running on a server either locally or from another machine, IF you have permissions.

The syntax is net [start | stop] service_name.

It's not recommended for services such as FTP or WWW but can be used for example to start or stop the Microsoft Indexing Service:

<!--#exec CMD="cmd.exe /C net start cisvc" -->
<!--#exec CMD="cmd.exe /C net stop cisvc" -->

NOTE 1: These Commands we used here with the SSI Exec directive are commonly used with ASP, so some may not work correctly with SSI.

NOTE 2: For these to work the page must have anonymous access removed and must have Administrative privileges on the target server.

NOTE 3: Don't play with these unless you know what you are doing!

View more... 
Select Vietnamese to find other information or service from Vietnamese site(s).

Email to your friendEmail to usGet updates by EmailView updates on WebFollow us on TwitterGoogle Safe BrowsingMcAfee SiteAdvisorDiagnostic this pageNoreton SafeWebDrWebTechnorati LinksSave to del.icio.usAdd to del.icio.usDigg This!Share on Facebookoutside.in: geotag this storyDiscuss on NewsvineStumble It!Add to Mixx!

If you would like to submit your website for FREE or advertise your own webpage(s) on our webpages, please enter Terms of Service webpage to send your request. Thank you!

©2004- ESI Portal ™®

Products / Services

(\__/)
(=^.^=)
(")_(")
ESI Portal
HOME
Top News
Online Tools
Online Translator
WYSIWYG Editor
Source Code Editor
Real Time Tool
2D Map Tool
3D Map Tool
Forex News
Online Shopping
Watch Videos
Listen Songs
Find Jobs
For Webmasters
About Us
Privacy Policy
Terms of Service
Contact Us
Live chat with us