Efficient way to test new web application....

Reply

Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

Efficient way to test new web application....

 
0
  #1
Dec 21st, 2006
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.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

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

 
0
  #2
Dec 22nd, 2006
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.
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

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

 
0
  #3
Dec 22nd, 2006
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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

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

 
0
  #4
Dec 22nd, 2006
Nice one, that sounds like just the job :p . I'll give it a try. Thanks.

Steven.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

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

 
0
  #5
Dec 22nd, 2006
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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

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

 
0
  #6
Dec 22nd, 2006
...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
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

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

 
0
  #7
Dec 23rd, 2006
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.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

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

 
1
  #8
Dec 24th, 2006
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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

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

 
0
  #9
Dec 24th, 2006
Yes :p . Local testing is go. Thanks for the advice.

Steven.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

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

 
0
  #10
Dec 24th, 2006
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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3214 | Replies: 9
Thread Tools Search this Thread



Tag cloud for IT Professionals' Lounge
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC