Web Site Creation - testing .*pl etc....


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Web Site Creation - testing .*pl etc....
# 1  
Old 03-27-2005
Question Web Site Creation - testing .*pl etc....

Hiya All,

How can I test my PERL Scripts whilst making my web site?

I'm hoping there is some software out there that emulates a Web Server - without all the hassle of my building/setting up a Web Server from Stratch (Never done anything like that before - my next big project! 8) )


I'm happily my basic Web site at the moment, and haven't uploaded onto a web server or anything yet.


I'm stuck at the 1st hurdle WRT Perl Scripts!

I've created a basic PERL Script, which is suppose to generate a test web page. (See below.)


I cannot get it to run on my Standalone XP laptop at the moment. I'vve tried on my REHAT 8.0 PC as well - no good. It just fires up a DOS screen for a second, then dies


Hope you can help
Martin


>>>>>>>>>>>>


My Perl Script:

.....
!#C:Perl\bin\perl.exe

print "content-type:text/html\n\n";

print "<html>";
print "<head>";
print "<title>Test Web Page by PERL SCRIPT</title></head>";

print "<body>";
print "<h2>Test Web Page by PERL SCRIPT!</h2>";
print "</body>";

print "</html>";


>>>>>>>>>>>>>>>>>>>>>>

PS:

I'm making a basic Team Web site.

Looking to add a Basic MySQL database at back, with PERL scripts referencing it etc.....

I'm stuck on the 1st hurdle!

Please help!

8)
# 2  
Old 03-27-2005
From a *nix shell, just run it through Perl and put it in a text file.
Code:
perl myscript.pl > myscript.html

You can open this in any browser.
# 3  
Old 03-27-2005
It is not as simple as "just changing the name of a file to an html file and opening the file with a brower." (as the first response would lead you to understand)

You will benefit by understanding the concepts of "Mime types" "handlers" and "CGI" and how to configure these (on, I assume, Apache server).


See this tutorial for more info.
# 4  
Old 03-29-2005
(Language removed - suggest you read the rules )

First of all, what I wrote is 100% correct for the code he posted - it is plain text to html, but in perl, without any CGI scripting involved.

Second, if you had cared to read his post you would have noticed his actual question: how to evaluate it without running a web server.

"You would benefit" indeed - feel superior much ?

Last edited by RTM; 03-29-2005 at 04:09 PM..
# 5  
Old 03-29-2005
Maybe you don't care but you never insult the owner - just fyi. After closing the thread, I realize the original poster may have more questions so I re-opened it. Adaptr - please read the rules.

Last edited by RTM; 03-29-2005 at 04:17 PM..
# 6  
Old 03-29-2005
Not that NEO needs any support, but he is correct. There are several distributions that you can install on a Windows PC that have apache web server, PHP, Perl, MySql and other "stuff". I did not have any experience installing these and found them quite good with detailed instructions on the setup. Most come with default settings that can get you up and running in a short amount of time. I use one to do development work before I upload them to a server. Post back if you want some links. I will look around for them. Good Luck.
# 7  
Old 03-29-2005
Quote:
Originally Posted by jyoung
Not that NEO needs any support, but he is correct. There are several distributions that you can install on a Windows PC that have apache web server, PHP, Perl, MySql and other "stuff". I did not have any experience installing these and found them quite good with detailed instructions on the setup. Most come with default settings that can get you up and running in a short amount of time. I use one to do development work before I upload them to a server. Post back if you want some links. I will look around for them. Good Luck.

Hiya J!

8)

If you throw me some links to this kind of software - I'd really appreciate it

Cheers
Martin
Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

Web Application creation on UNIX

Hi, I would like to create an application with HTML front end in Unix. I am working on enterprise Unix server, so I could not install any add ons or software in my machine. but still i have super user permissions. I can change the permissions as i wish. I have built a small application with... (1 Reply)
Discussion started by: Balasankar
1 Replies

2. Web Development

Web Site Performance Issue

Hi All, I am currently managing a web site. I find that during the peak time period,ie,between 1300hrs to 2100hrs everyday,the response slows down whenever i access the applications hosted by the server.However when i try to access the static content in the web server,it loads quickly. The... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

3. Shell Programming and Scripting

I need help in creating my first web site?

I have always wanted to create my own site, I've only had one class about the basics in creating web pages but know i would like to get into more and more detailed info about doing so anyone with alot of experience please help me out.:b: (0 Replies)
Discussion started by: kprescod4158
0 Replies

4. AIX

how to browse a web site using script

hi guys, ok this script, i am trying to browse a http site and store the output in a text file ... when i run the script , i get a http compatibility error. does any1 have a good solution to contact a http server and save the html in a text file.. i know the result comes with html tags. ... (4 Replies)
Discussion started by: kirantalla
4 Replies

5. AIX

intranet web site

hello I would like to create an internal web site, but how do i make it with Aix ? I must to install apache and send my http pages in the declared repertory ? There are some configuration files to modify ?? thank you (2 Replies)
Discussion started by: pascalbout
2 Replies

6. UNIX for Dummies Questions & Answers

Web site mirroring

I have a unix server running RedHat Linux 9.0. I want to mirror my site on a different server with the same configuration so if the main server goes down, the other server will take over. How is this best accomplished? (1 Reply)
Discussion started by: wvmlt
1 Replies

7. News, Links, Events and Announcements

Microsoft Is Using Linux To Protect Its Own Web Site

Here is a great news story: http://story.news.yahoo.com/news?tmpl=story&cid=74&e=9&u=/cmp/13100775 (3 Replies)
Discussion started by: Neo
3 Replies

8. UNIX for Dummies Questions & Answers

Web site setup

Hi, I have a m/c loaded with redhat linux, static IP address and this m/c intern connected to the internet thro leaseline. Now i need to setup a company website has www.abc.xyz.com. What necessary configuration i need to do so that others can view our website. Thanks Bache Gowda (5 Replies)
Discussion started by: bache_gowda
5 Replies

9. News, Links, Events and Announcements

Password Creation Site - Feedback

Hi, I created a new site called http://www.goodpassword.com to help users and adminstrators create good, random passwords. It also includes .htaccess encryption. I'd be interested in feedback ie errors, improvements, additions etc. thanks DJay (0 Replies)
Discussion started by: djay
0 Replies
Login or Register to Ask a Question

Featured Tech Videos