Archive for the ‘General Windows’ Category

Goto Command Prompt,

-> Type Java -version and press Enter

-> If it installed, will display as

C:\>java -version
java version “1.6.0_13”
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

If not installed,will be display as follows,

C:\>java -version
‘java’ is not recognized as an internal or external command,
operable program or batch file.


Read Full Post »

Sometimes I need to keep an eye, while I am re-boot the server from the Start menu. Because, the option which you use restart instead shutdown will takes the server to Offline. This makes hectic and pressure for the tech’s who works in Remote Server maintenance. So, here is a guidelines to disable the Shutdown option from the Start menu.

Start -> Run -> regedit -> Expand it as follows,

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability]

Done.  Now it feel much better !

Note:  Always, ensure to take backup of Registry.

Read Full Post »

Install FastCGI

Install the Fast CGI for IIS 6.0

FastCGI is a language-independent extension to the Common Gateway Interface (CGI) that enables Web servers to execute applications more quickly and efficiently. Unlike CGI, which creates a separate process for each incoming request, FastCGI uses a single process to handle multiple requests. IIS uses FastCGI to support the popular PHP scripting language, which makes it one of the more important features of the product.

Download the FastCGI extension for 32-bit and 64-bit Windows XP and Windows Server 2003 here:


When you run the FastCGI installer, it copies FastCGI-specific files to the ”%windir%\system32\inetsrv” folder, and then registers and enables the FastCGI Web server extension. Of the files that the installer copies, note the following:

  • fcgiext.dll – This is the actual FastCGI handler that communicates with FastCGI-enabled processes for processing requests.
  • fcgiext.ini – This is the configuration file that contains the mapping of file extensions to FastCGI processes. It also contains the configuration of FastCGI process pools.
  • fcgiconfig.js – This configures the FastCGI extension. The script updates the fcgiext.ini file, modifies the IIS metabase and recycles the Web service application pools if necessary.

To configure the FastCGI extension to work with PHP:

  1. Open a command prompt.
  2. Change the current directory to %windir%\system32\inetsrv.
  3. Register the PHP CGI program as the one that will be processing .php extensions by running the following configuration script.

cscript fcgiconfig.js -add -section:”PHP” -extension:php -path:”C:\PHP\php-cgi.exe”

Script mappings for the PHP extension in the IIS metabase, and modify the fcgiext.ini file that is located in %windir%\system32\inetsrv.

To create script mapping:

1. Launch inetmgr.exe.
2. Double-click the machine icon for the local computer.
3. Right-click Web Sites and click Properties.
4. Click the Home Directory tab.
5. Click the Configuration… button.
6. Click the Add… button.
7. In the Add/Edit Application Extension Mapping dialog box, click Browse…. Navigate to the fcgiext.dll file that is located in %windir%\system32\inetsrv.
Note: If you need to use FastCGI in 32-bit mode on a 64-bit machine, navigate to %windir%\SysWOW64\inetsrv.
8.  In the Extension text box, enter .php.
9.  Under Verbs, in the Limit to text box, enter GET,HEAD,POST.
10.  Ensure that the Script engine and Verify that file exists check boxes are selected.
11.  Click OK.

FastCGI Configuration for Optimal Functionality, Security, and Performance with PHP

IIS identified the set of configuration settings for the FastCGI extension and PHP that would provide optimal functionality and performance for PHP applications when running on Windows by using the FastCGI extension.

To obtain optimal functionality and performance, configure your server as follows:

1.  Modify the php.ini file as follows:
* Set fastcgi.impersonate = 1. FastCGI under IIS supports the ability to impersonate the security tokens of the calling client. This allows IIS to define the security context under which the request runs.
* Set cgi.fix_pathinfo=1. cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. Previously, PHP behavior was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not define PATH_INFO. For more information about PATH_INFO, see the cgi specifications. Setting this value to 1 will cause PHP CGI to fix its paths to conform to the specification.
* Set cgi.force_redirect = 0.
2.  Set the FastCGI configuration settings for the PHP section by running fcgiconfig.js as follows:
* Set the FastCGI process pool property InstanceMaxRequests to 10000. This setting specifies that the FastCGI extension will recycle php-cgi.exe after it has processed 10000 requests successfully.
> cscript fcgiconfig.js -set -section:”PHP” -InstanceMaxRequests:10000

3.  Configure the FastCGI extension to set the PHP_FCGI_MAX_REQUESTS environment variables for the PHP process to 10000.This setting instructs php-cgi.exe to recycle itself after it has processed 10000 requests successfully.
> cscript fcgiconfig.js -set -section:”PHP” -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000

To test the PHP application, create and request a info.php

Read Full Post »

1. Choosing which package to download.

Packages can be downloaded from the following page:


2. Installing the Package

Figure 1 -Selecting Standard Installation
Figure 1 -Selecting Standard Installation

Despite what you might expect, the “Advanced” installation offers little over the “Standard” so it’s best to simply go for standard. Don’t worry about the “Mail Configuration” unless you know what you’re doing – just click “Next”.

Figure 2 -Selecting IIS6 Installation
Figure 2 -Selecting IIS6 Installation

Obviously, if you’re installing onto Windows Server 2003, you need to change the selection to “Microsoft IIS 6 or higher” and click “Next”.

A small box will appear to tell you that “IIS has been configured”. Press “OK”.

Figure 3 - Windows Script Host (ignore it)
Figure 3 – Windows Script Host (ignore it)

Closely followed by Figure 3 above (just ignore it and click “OK”)

Figure 4 -Registering CScript (Click "No")
Figure 4 -Registering CScript (Click “No”)

As VBScript has nothing to do with PHP just click “No” when Figure 4 (above) appears.

A couple of OK’s later, PHP is installed. Well, not quite.

3. Configuring Internet Information Services (IIS) Manager:

Figure 5 - Web Service Extensions
Figure 5 – Web Service Extensions

If you are using the new style Start menu, you can reach the Internet Information Services console by clicking “Start”, “Administrative Tools” and selecting “Internet Information Services (IIS) Manager” from the list.

If you are using the “Classic” style Start Menu, you can reach the console by clicking “Start”, “Programs”, “Administrative Tools” and select “Internet Information Services (IIS) Manager” from the list.

We need to configure “Web Service Extensions” so right-click on “Web Service Extensions” in the menu on the left. Then select “Add a new Web service extension…” from the list (as shown in Figure 5 above)

Figure 6 - Creating a PHP web service extention
Figure 6 – Creating a PHP web service extension

Complete the dialogue box as shown in Figure 6 (above). Make sure you check the “Set extension status to Allowed” checkbox. The “Extension name:” is only a reference and hence can be anything – PHP makes it easy to identify in future though.

Figure 7 - The completed Web Service Extensions window
Figure 7 – The completed Web Service Extensions window

The completed “Web Service Extensions” window should now look like figure 7

4. Allowing index.php files to run as a directory default:

Figure 8 - Configuring your default PHP content page
Figure 8 – Configuring your default PHP content page

In “Internet Information Services (IIS) Manager”, left-click on “Web Sites” in the menu on the left and select “Properties” (as shown in Figure 8 above). Next, select the “Documents” tab and click on “Add”.

Figure 9 - Configuring your default PHP content page
Figure 9 – Configuring your default PHP content page

To ensure that index.php documents open as a default they should be added as a “Content Page” as shown in Figure 9 (above). You can, of course, change the importance of PHP over ASP and HTML documents to suit your site based on which document type should take preference. This can be achieved by moving “index.php” up or down the list using the “Move up” and “Move Down” buttons.

5.The Final Step – Moving the php.ini file:

For some reason, the Installer copies it’s php.ini file into the “Windows” directory under the profile of the logged-on user rather than the root directory C: (where it should be).

  • Copy “php.ini” from C:\Documents and Settings\<username>\php.ini to C:\Windows

If you can’t find “php.ini” simply open “My Computer”, right-click on your C: drive and select “Search” from the list. Then type php.ini into the “All or part of the file name” box and press “Search”. The file that appears in the right-hand side of the window should be copied into C:\Windows.

6. Some Exceptional steps to configuration.

Open both the php.ini file you have now and uncomment cgi.force_redirect in php.ini and set it to 0 – zero.

Find SMTP = localhost and make sure it is uncommented. If your mail server is somewhere else you may specify it here. Also set this line just below the above: sendmail_from = someone@yourhost.com

Change session.save_path as “session.save_path=C:\php\sessions” and make the directory C:\php\sessions

Set the line “extension_dir” as “extension_dir = “C:\PHP\ext”.

Uncomment all of the following items.

Now copy all of those DLL files in C:\php\ext to C:\windows\system32 or add “C:\PHP;” to your Windows path.
To add php to your Windows path:

  1. Right Click on My Computer and choose properties > Advanced Tab > Click “Environment Variables”.
  2. Now add “C:\PHP;” to the very beginning.
  3. Now go to start > run > type: regedit and click ok
  4. Add HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath = C:\php to the registry. If you change your windows path instead of copying the dll files then you will need to restart your computer before php will work. Updating php is easier when you add it to your Windows path.

Figure 9 - Creating the required registry keys and values
Figure 9 – Creating the required registry keys and values.

Open the Registry Editor by clicking “Start”, “Run”, typing “regedit” and pressing “OK”. Perform the following procedure (illustrated by Fig. 9 above):

  • Locate and expand “HKEY_LOCAL_MACHINE”, right-click on “Software” and select “New”, “Key” and type “FASTCGI”.
  • Right-click on your new “FASTCGI” key and select “New”, “Key” and type “.php”.
  • Right-click on “.php”, select “New”, “String Value” and type “AppPath”. Double-click on this new value and type “c:\PHP\php.exe”.
  • Right-click on “.php”, select “New”, “String Value” and type “BindPath”. Double-click on this new value and type “php-fcgi”.

You can now close the Registry editior.

  • Go to C:\Inetpub\wwwroot and delete everything in there except for aspnet_client. Now make a new text file and name it phpinfo.php. Open it up with your text editor ant put this in it: <?php phpinfo(); ?>.
  • Open a web Browser and go to

Read Full Post »

Windows Server 2003

If you have Windows Server 2003, there are two methods to determine whether you are running a 32-bit or a 64-bit version. If one does not work, try the other.

Method 1: View System Properties in Control Panel
  1. Click Start, and then click Run.
  2. Type sysdm.cpl, and then click OK.
  3. Click the General tab. The operating system is displayed as follows:
    • For a 64-bit version operating system: Windows Server 2003 Enterprise x64 Edition appears under System.
    • For a 32-bit version operating system: Windows Server 2003 Enterprise Edition appears under System.
Method 2: View System Information window
  1. Click Start, and then click Run
  2. Type winmsd.exe, and then click OK.
  3. When System Summary is selected in the navigation pane, locate Processor under Item in the details pane. Note the value.
    • If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of Windows.
    • If the value that corresponds to Processor starts with EM64T or ia64, the computer is running a 64-bit version of Windows.

Read Full Post »

Applications, typically files with a .exe extension, can only be run when the Server is logged in. A service can be run on a server, without it being logged in. Windows provides the functionality to configure an application to run as a service.

  1. Login to the server through Remote Desktop Connection.
  2. Download Microsoft’s Resource Kit from http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en This Resource Kit contains instsrv.exe and srvany.exe.
  3. Run the rktools.exe file from the location you selected in step 1. Follow the installation instructions.
  4. Click Start and select Run.
  5. Type cmd and click OK.
  6. Within the prompt type instsrv MyService srvany.exe where MyService is the name of the service. The service name can be whatever you want, but should be descriptive. You may need to change to the directory that contains the srvany.exe file. Use Search to find it.
  7. Press Enter.
  8. When the command completes, click Start and select Run.
  9. Type regedit and click OK to open the Registry.
  10. Expand HKEY_LOCAL_MACHINE, expand SYSTEM, expand CurrentControlSet, expand Services.
  11. Find the name of the service you created in the list and select it so that it is highlighted.
  12. From the Edit menu, select New and select Key.
  13. Name the key Parameters.
  14. Select the Parameters key so that it is highlighted.
  15. From the Edit menu, select New, select String Value.
  16. Name the string value Application.
  17. Select the Applications string so that it is highlighted.
  18. From the Edit menu, select Modify.
  19. Enter the full path to the application executable, including the drive letter and the application extension.
  20. Close the Registry.
  21. Click Start, Programs, Administrative Tools and select Services.
  22. Find the service you created and click Start.
  23. 🙂

Read Full Post »

Some of server won’t allow you to copy and paste the text or password inside the server.

Goto – Task Manager – verifiy a file ‘rdpclip.exe’ is running.

If -not- Execute the process in Start – Run – rdpclip.exe – Ok.

Have a try !

Read Full Post »

Older Posts »