Jump to content

Using a server on Win95 to learn Perl


BenoitRen

Recommended Posts

I have Personal Web Server (from the Win95 CD) and ActivePerl 5 installed. This seemed to work fine, but then I ran into problems when following a tutorial to send cookies to the browser. The cookie never gets stored, and if it does get stored because of some strange hack involving removing a comma (next to "testing", which is bad syntax), it works, but it never has any content.

#!perl/bin/
use CGI::Carp qw/fatalsToBrowser/;

use strict;
use CGI;
use CGI::Cookie;
my $cgi = new CGI;

my $c = new CGI::Cookie(-name => 'different',
-value => "testing",
-expires => '+1d',
-domain => 'localhost');


print "Set-Cookie: $c\n";
print "Content-Type: text/html\n\n";
print $cgi->start_html('Sending cookie');
print $cgi->p('I got your cookie.');
print $cgi->end_html;

exit(0);

I'm sure the code is correct. I even asked others already. The very first line doesn't matter for a Windows server, by the way.

Is this a known problem with PWS? And, since it looks to be a problem with it, is there another small web server that I can install for development purposes that I can point to the Perl libraries? Apache is out, as it will only run on a fully updated Win98 and above system.

Link to comment
Share on other sites


I used to run into a few problems developing on PWS, it is not a fully featured web server.

There are a few free web servers out there most noteably Abyss Web Server which has a very small download and installed footprint. Go here for easy to follow instructions to configure Abyss to run with perl and other technologies.

Abyss is so easy to install and configure, I know a few companies that are using it in production enviroments.

Hope this helps.

Link to comment
Share on other sites

Is IE set to accept cookies?
WTF? I use SeaMonkey, and it had been set to ask for each cookie at the time, with no websites blocked.
There are a few free web servers out there most noteably Abyss Web Server which has a very small download and installed footprint.

Thanks, seems neat! Unfortunately, I ran into the exact same problem. So it must have something to do with my ActivePerl installation. Then, s*** happened.

I wanted to install ActivePerl the normal way, which is to use an MSI package. So I had to install MSI first. Then, I tried to launch the MSI package. Crap, it wants Windows Scripting Host! No way am I going to install that.

MSI then being of no use to me, I wanted to uninstall it. There's no uninstall option! Thanks, M$! So I manually removed the files. But then I discovered it had done more than copy files and associated a couple extensions!

IT HAS INSTALLED PART OF IE ON MY MACHINE!

This was evident by the Favorites folder now being considered as a system folder. At first I had noticed how my Windows folder had become 1.5 times its normal size.

f***. Now I'm going to have to reinstall Windows.

Link to comment
Share on other sites

If you would like to try a different web server, I think Xerver will run on Win95. It's Java based and very light when run in non-gui mode.

I have had much success with it on my old 233mhz machine with WinME.

http://www.javascript.nu/xerver/

Be sure to read the help section about getting it to work with Perl: http://www.javascript.nu/xerver/help/index.html

Link to comment
Share on other sites

  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...