Enables PWS and IIS to support CGI (no extract, previously asked before to query)

Source: Internet
Author: User
Tags iis
First, PWS configuration ActivePerl, so that PWS support CGI programs.
1. Install PWS4.0 under Windows98 (Microsoft Personal Web Server 4.0 is in the Add-ons directory of the WINDOWS98 system CD).
2. Download APi522e.exe (this is recommended under Windows98), download the address:
Http://www.cgiunion.net/perlsoft/APi522e.exe, Http://www.activestate.com/ActivePerl/download/Api522e.exe, or HTTP ://www.fykx.net/download/cgi/api522e.exe
3. Installation of APi522e.exe, recommended to install in the C:USR directory, because the first line of each CGI program file to declare the CGI interpreter path (#!/usr/bin/perl).

4. Run regedit (need to restart the computer to take effect)
Find: Hkey_local_machinesystemcurrentcontrlset
Servicesw3svcparametersscriptmap Directory
Add the following key values:
Key name: ". CGI" key value: "C:usrbinperl.exe%s%s"
Key name: ". pl" Key value: "C:usrbinperl.exe%s%s"

5. Add a virtual directory for PWS (pictured below), directory alias: Cgi-bin, set access property to: Execute, directory location for the local hard disk of any directory (CGI program is stored in this directory).

6. Write Test procedures:
File test.cgi placed in the Cgi-bin directory, the code is as follows
#!/usr/bin/perl
print "content-type:text/html";
Print "<TITLE> This is my first program </TITLE>";
Print "Ha! Ha! Ha! I succeeded!!! ";
Type http://127.0.0.1/cgi-bin/test.cgi in the browser address bar
If it is displayed in the browser: Ha! Ha! Ha! I succeeded!!! You will succeed.
7. For the problem of error resolution, in order to debug YuziBBS3000 as an example, the configuration file setup.cgi as required to start running, the result
The following error occurred:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The
Headers it did return are:
Can ' t locate setup.cgi in @INC (@INC contains:c:/usr/lib c:/usr/site/lib.) at

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.