PDA

View Full Version : CGI / Perl Virtual Machine?


Justin
01-07-1999, 05:07 PM
After a few attempts at downloading the lousy 1 meg, I finally got it (my ISP is acting up today). It is neat, but I realized after downloading it that I still need to install Perl for Win32. What that page was for was a perl debugger - something that will probably come in very handy for me, being new to the language.

But it did answer my question - yes, there is a perl interpretor for Win 9x. So I just need to search for it / one. I'll do that when I get some time. As I said, just curiosity.

If I had some super-fase net connection, I wouldn't mind experimenting on the server directly (that didn't sound the way it was intended), but I have a 28.8 Winmodem, of all modems. So it's just a major pain. Basically, my objective is to be able to do with Perl what I do with HTML - do it all locally, then upload when it's done.

Although with SSI, I can't do that with HTML anymore... But I know HTML enough to not worry about if it's going to work or not.

Anyway, I'm rambling again (that's what I do when I get tired), so I'm going to go now. Thanks for the link and the quick response :-)

Justin



------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

Del
01-07-1999, 07:49 PM
I have Windows95 on a 166mhz Pentium here, and I run Apache and Perl5.004 (I think) on it pretty good. It won't handle any of my scripts with UNIX specific system calls (which is most...) but it certainly comes in handy for bugfixing sometimes.

Apache for Win32 is available from www.apache.org/ (http://www.apache.org/) and Perl for Win32 from www.activestate.com/ (http://www.activestate.com/) You could also poke thru download.com for a perl port. It's also been said that the latest version(s) of Perl do not require a special port to run on Windows, that the standard distribution will compile on Win95,98,NT as long as you have a C compiler installed.



------------------
Del
www.downinit.com (http://www.downinit.com)

da da da

[This message has been edited by Del (edited 01-07-99).]

Justin
01-08-1999, 01:16 AM
Is there such thing as a "Virtual Machine", for a Windows 9x based machine to run / test cgi? I've never heard of one, but it would be nice to be able to experiment on my own machine before trying them out on the server (I haven't written any yet, my curiosity is just running away!)

Or would NT stuff run on 98? I know there has to be a perl interpretor for NT, of course, so would it possibly run or is there one that would on 98?

I know that these are kinda silly questions, but I just realized that cgi / perl is run on NT all the time, so there must be something for 9x.

Anyway, like I said, I don't have any scripts yet, I don't even know the first thing about them yet, I would just like to learn. Again, it's not that important (you guys all have a habit of being too quick at answering even the dumbest questions :-). Not that there's anything wrong with that...

Just wondering...

------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

Deb
01-08-1999, 01:58 AM
I *think* this may be what you are looking for... http://www.activestate.com/pldb/

Not postive though...

Deb

Deb
01-28-1999, 10:56 PM
Have not read this page or anything but just stumbled upon something that seems to fit this post.

Check it out at http://www.visca.com/clueless/gs_perl_apache_win95.html

Deb

ChrisH
01-29-1999, 12:35 AM
Hey Justin -


I think that you can get away with "just"
the perl interpreter to do your basic cgi
debugging. It's not as nice, but you have
to just use the CGI.pm package and it makes
it relatively easy to pass parameters to it
like the server would. In fact, it's kinda
hard to debug CGI through the server
sometimes as all you get usually is a
server fatal error ... no other info.

To look at the output you just need to
redirect output to a file and keep reloading
it into the browser.


have fun,


ch

------------------

Deb
01-29-1999, 12:49 AM
In fact, it's kinda
hard to debug CGI through the server
sometimes as all you get usually is a
server fatal error ... no other info.

The standard error via the browser is useless... but if you telnet in and type
perl -c filename.ext there is usually more information about what went wrong and suggestions for its fix http://www.aota.net/ubb/smile.gif

(replace filename.ext with the name of the file of course)

Deb

Justin
01-29-1999, 12:52 AM
I'm going all out now. I just installed the Apache 1.3.4 Win32 thing, and I'm 94% done downloading the perl stuff. I'm editing the apache configuration files now - I'm mirroring the server's directory structure locally (e.g. c:\big\dom\xvdj...).

http://www.aota.net/ubb/smile.gif

I may get bored and throw Linux on my 486 SX-33 laptop and try to run a mini web server through the null modem - that'll be fun! I can set the speed to 115,200 baud and it would be just like being on a slower version of the server (with a little faster connection). But for now, I'm setting up a local virtual server. Cool.

I just got email that Deb has replied...

Justin

Justin
01-29-1999, 02:04 AM
Holy cow is this sucker fast!!! My SSI parser that I wrote in VB6 takes about 1-2 seconds to parse my SHTML, but this Apache server is instantanious!! I love this - it's like a web server right at home.

I can't seem to get the perl part to work - 500 Internal Server Error, and it says to contact Webmaster@VDJ.Net - umm...

Anyway, I'll figure it out on my own, I'm sure. Otherwise it's great!

I like how I asked a dumb question about a week ago, wondering if it was at all possible to run a perl script on my own machine, and here I am running pretty much a full blown virtual server http://www.aota.net/ubb/biggrin.gif hehe

This is great fun... So during the outage tonight, I can still play with perl (and if I crash the server, it's no big deal...) I now need to get PHP and all that cool stuff, if it's been ported to Win32 (I'm sure it has.. I'll look later - one thing at a time!)

Thanks for all the help, everyone. The link to http://www.visca.com/clueless/gs_perl_apache_win95.html was the ticket, though. Plain english terms, step by step. I like that.

I realize, too, that this will help me to figure out a lot of the things I need to know about doing things on the server, since I can try them here first. I pretty much mirrored the directory structure for my domain and path to perl, so once I get perl working right (might just need to restart Apache) everything should work identically on both.

Justin
-- Much nicer than my buddy's 1961 Chevy Apache --

Del
01-29-1999, 03:17 AM
In response to Deb's above post

The standard error via the browser is useless...


There is a handy thing that is in the CGI.pm package called fatalsToBrowser. Towards the top of your script, add the following line;

use CGI::Carp qw(fatalsToBrowser);

That will (more or less) output the same response as

perl -cw filename.ext

will, only directly to your browser http://www.aota.net/ubb/smile.gif Mighty handy some times.



------------------
Del
www.downinit.com (http://www.downinit.com)

da da da

Justin
01-29-1999, 04:17 AM
Hehe - I have a message board on my computer! Cool http://www.aota.net/ubb/biggrin.gif

By the way, did you know that there's a site called http://www.localhost.com ? I got it by mistake, and that's the site's intent. Wierd. There's also MyComputer.com, but oh well. Anyway, I actually set up a mini web server without too much help http://www.aota.net/ubb/smile.gif

It's way past my bedtime, too, but I can't stop playing. I still want to make my own message script that blows away the UBB, and now I have some of the tools needed. Ok, maybe close to the UBB http://www.aota.net/ubb/smile.gif

Anyway, I never knew how easy this stuff could be! And it's free, too. That's better than my $99 monitor.

It's funny seeing a 500 Internal Server Error on my own computer (and 404's and such).

Sorry. Too much coffee today - very easily amused...



------------------
Justin Nelson, SFE Inc.
http://www.vdj.net