944,199 Members | Top Members by Rank

Ad:
Dec 21st, 2006
0

Efficient way to test new web application....

Expand Post »
Hello everyone. I've been working on a web application (written in Perl) called perlBB for about 11 weeks ( http://sourceforge.net/projects/perlbb ). I'm getting close to finishing an early version. However, suitable testing methods have become a bit of an "issue" for me on this project. So far I've been testing the code from the command line on my local machine and on a web server that I have an account on. This is OK until I start wishing I could test my application on the local machine "as if" it was running on a server. i.e. a server running on my computer.

I know I could try installing a server on my computer and use that as a test bed, but I have two reservations:

1. The machine in question uses Windows 98.

2. I am thinking that installing a web server and getting the Perl interpreter to work with it could prove rather tricky for a novice like me.

Does anyone know of available test bed systems that fit this bill and aren't too much on the difficult end to set up (on Windows 98)? Any advice appriciated.

Steven.
Similar Threads
Reputation Points: 47
Solved Threads: 1
Posting Whiz in Training
Mushy-pea is offline Offline
271 posts
since Jun 2006
Dec 22nd, 2006
0

Re: Efficient way to test new web application....

Have you not thought about just buying a shared web server. They are very cheap and you could make a website of your own to properly advertise your app. You could then use this to test your site in a hidden directory. Just an idea and it isn't costly and it is very simple to do.
Reputation Points: 178
Solved Threads: 15
Nearly a Posting Virtuoso
roryt is offline Offline
1,282 posts
since Oct 2005
Dec 22nd, 2006
0

Re: Efficient way to test new web application....

You can run a small webserver like xampp;
http://www.apachefriends.org/en/xampp.html.

It will support an ActivePerl integration in Windows, and their site says it works in Windows 98. You don't need to connect it to the Internet; just run the xampp_start program and then all pages in the xampp/htdocs directory will be available from http://localhost/ as if they were on a server.

It's a really non-envasive package as well.. you can put the xampp folder on a CD/USB disk, and use it anywhere without installing it.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Dec 22nd, 2006
0

Re: Efficient way to test new web application....

Nice one, that sounds like just the job :p . I'll give it a try. Thanks.

Steven.
Reputation Points: 47
Solved Threads: 1
Posting Whiz in Training
Mushy-pea is offline Offline
271 posts
since Jun 2006
Dec 22nd, 2006
0

Re: Efficient way to test new web application....

if that isn't sufficient, you could run a full distribution of the Apache webserver locally... Apache is a bit meatier, and more configurable. But, I found XAMPP to be useful for small tests.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Dec 22nd, 2006
0

Re: Efficient way to test new web application....

...KevinADC o'er at the Perl board may have some worrying probs to disclose about the use of XAMPP, I read this right after I advised you to use XAMPP:

http://www.daniweb.com/techtalkforums/thread64960.html
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Dec 23rd, 2006
0

Re: Efficient way to test new web application....

Well, "installing" it turned out to be easy and I soon had Apache running. I tried the sample Perl script "perltest.cgi" and it worked on the server. However, when I ask the server to run my own script I get

The server encountered an internal error and was unable to complete your request.

Error message: Premature end of script headers: forum.cgi

I can't see what's wrong with it by comparing the top of my script with "perltest.cgi". Did you run into problems like this Matt?

Steven.
Reputation Points: 47
Solved Threads: 1
Posting Whiz in Training
Mushy-pea is offline Offline
271 posts
since Jun 2006
Dec 24th, 2006
1

Re: Efficient way to test new web application....

well, I found a good "first-thing" to do with test scripts is to change the .pl script first line to:
#!"C:\ActivePerl\bin\perl.exe"
(if that's where your activeperl is)... that stops you needing to extend the tiny Perl version that comes with XAMPP...

Setting that first line is probably the most important thing to do, especially if you use alot of ActivePerl modules.
That message generally means the script threw an error before it sent a content type...
add a use like this:

use CGI::Carp qw(fatalsToBrowser warningsToBrowser);

and then send a "Content-Type" header of text/html before you do anything else....
Without Carp (CGI debug) switched on,; missing modules can be a cause of that kind of error.
Last edited by MattEvans; Dec 24th, 2006 at 7:48 am.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Dec 24th, 2006
0

Re: Efficient way to test new web application....

Yes :p . Local testing is go. Thanks for the advice.

Steven.
Reputation Points: 47
Solved Threads: 1
Posting Whiz in Training
Mushy-pea is offline Offline
271 posts
since Jun 2006
Dec 24th, 2006
0

Re: Efficient way to test new web application....

Just a quick tip, you shouldn't need to change the #! line in all your modules; just change it in the ones that are directly executed (.pl or .cgi)... the perl interprettor at the first location should figure out that the rest of them are irrelevant...

at least... i think it works that way ^_- Personally, I always put the environment's perl location in a #! in any .pl or .pm file..

EDIT and a quick test proves that that's a waste of a whole line per module :o
Last edited by MattEvans; Dec 24th, 2006 at 10:06 am.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in IT Professionals' Lounge Forum Timeline: Search inside a Search
Next Thread in IT Professionals' Lounge Forum Timeline: C++/vc++/c#/com/mfc/win32api/





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC