[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Personal Web Server and CGI

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
heydoug
Asked:
heydoug
  • 5
  • 3
  • 2
  • +2
1 Solution
 
jcondeCommented:
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
 
heydougAuthor Commented:
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
 
jcondeCommented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
aioudineCommented:
What kind of Win you use - Win95 or WinNT,
What kind of perl you have - Activestate, hip or other?
0
 
heydougAuthor Commented:
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
 
jcondeCommented:
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
 
fasterCommented:
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
 
aioudineCommented:
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
 
heydougAuthor Commented:
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
 
gravityCommented:
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
 
heydougAuthor Commented:
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
 
gravityCommented:
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
 
heydougAuthor Commented:
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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now