Solved

Personal Web Server and CGI

Posted on 1998-12-05
13
247 Views
Last Modified: 2013-12-25
I know it is possible to use CGI with Microsoft's Personal Web Server but I guess I'm not setting it up correctly.  I know about the 2 registry entries to register the .pl and .cgi extensions to run perl but that still isn't working.  Please Help!!!!  Thanks in advance.
0
Comment
Question by:heydoug
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 7

Expert Comment

by:jconde
ID: 1829972
Hi, do you have the execute permissions setup correctly?

I run php on a personal webserver in WinNT and I have no problems what so ever......php is pretty much like perl itself.

Please give me more info in order to be able to ehlp you!


0
 

Author Comment

by:heydoug
ID: 1829973
I have the execute and read permissions set.  I actually got a Perl script to run but the ones that follow are giving me difficulty.  I figured out that I had to put the location of the Perl interpreter in the Unix format:  #!c:/progra~1/perl/bin and it worked okay but I'm still having problems.  Help!  Thanks!
0
 
LVL 7

Expert Comment

by:jconde
ID: 1829974
Do you need to use perl for your cgi's or are you willing to take one step further and use PHP?

I've been developing cgi's for many years, and since I installed PHP (which is free, runs in unix, linux and winnt), cgi development has become much easier.

I really don't know what the problem is, but If you change to php ill help you out in any way I can to get you set up.

Php:  www.php.net

Jorge
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Expert Comment

by:aioudine
ID: 1829975
What kind of Win you use - Win95 or WinNT,
What kind of perl you have - Activestate, hip or other?
0
 

Author Comment

by:heydoug
ID: 1829976
Yes, I need to use Perl for my CGI, but I'm using Win95 and ActiveState Perl for Win95 version 5.03.  I cannot use the PHP unless it runs on Win95.  Do they have a port for Win95?
0
 
LVL 7

Expert Comment

by:jconde
ID: 1829977
Its the same thing....it will run on both.

What you might have to do under 95 is to run php as a cgi, not as a web-interpreted script.

I.E.
     http://localhost/webpage.php3                                       //Web Interpreted.
     http://localhost/cgi-bin/php.exe?path/to/webpage.php3    //Cgi version


I have ran both under NT, but can't remember doing so under 95.  Either way, your script will run just fine :)


0
 
LVL 7

Expert Comment

by:faster
ID: 1829978
Most likely Your problem is still in registry, show me your current registry setting and hopefully I can tell you where you are wrong.

BTW, what extension do you want to use? .pl or .cgi?  And do you want to use the exe version or the dll version of perl?
0
 
LVL 5

Expert Comment

by:aioudine
ID: 1829979
See FAQ section
My program runs fine from the command line, but bombs out when run as a CGI script.
http://www.activestate.com/support/faqs/win32/perlwin32faq6.html
0
 

Author Comment

by:heydoug
ID: 1829980
Regestry entries:
  .cgi  =  c:\progra~1\perl\bin\perl.exe %s %s
  .pl   =  c:\progra~1\perl\bin\perl.exe %s %s
  .idc  =  C:\WebShare\Scripts\httpodbc.dll

I've tried using .pl and .cgi.  My script reads an ini type file to get which extension to use becuase some webservers use .cgi and others use .pl. So I programmed it to use both.  

I'm trying to use the .exe version of Perl.  I don't know how to set up the dll version.  

Oh, what if instead of using the php like:     http://localhost/cgi-bin/php.exe?path/to/webpage.php3
I do something like with perl.exe:
   http://localhost/cgi-bin/PERL.exe?path/to/webpage.pl

Thanks so much for all your help.  It is getting me closer and closer each time!
0
 
LVL 2

Accepted Solution

by:
gravity earned 100 total points
ID: 1829981
To set up php, have a registry entry of

php = "C:\PHP3\php.exe"

or wherever you have it set up. You need to copy the php3.ini-dist file to your windows directory and call it php3.ini as stated in the readme file.

When I set up Perl to do the same thing (version 5, btw) I only needed the reference to the perl exe itself ie no %s %s :

pl = "C:\Perl5\perl.exe"

By the way, you are using invcerted commas ?


0
 

Author Comment

by:heydoug
ID: 1829982
Thanks for the info on the matter.  I was unable to get it to work though.  I thought you would want the points for this though.
0
 
LVL 2

Expert Comment

by:gravity
ID: 1829983
I must admit that I no longer use the microsoft server. I now use Xitami, which is a lot easier and versatile to set up...

try it @ http://www.xitami.com


0
 

Author Comment

by:heydoug
ID: 1829984
Actually this wasn't for me.  A customer of my company wants to run a program we did in CGI and he uses FrontPage (because he is to lazy to learn HTML) and it has all those stupid Microsoft Extensions and they aren't supported by the server (OmniPro Httpd) that we were using.  Bummer.

Thanks anyway!!!!!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question