Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7915071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:20:07+00:00 2026-06-03T14:20:07+00:00

I need small virtual machine with a Web server, so I decided to install

  • 0

I need small virtual machine with a Web server, so I decided to install Damn Small Linux. I need to run a Web server that is hosting a site with a script that checks for a server’s IP address and returns it in a HTML page. So far I have something like this working:

Script file:

#!/usr/bin/perl

print "Content-type: text/html\n\n" ;
print <<EOF ;
<html>
<head><title>CGI Results</title></head>
<body>
<h1>Hello, world.</h1>
</body>
</html>
EOF
exit ;

The script is called from HTML like this:

<iframe src="http://localhost/cgi-bin/skrypt.cgi" width="100%"></iframe>

It’s working fine, but whenever I add something to this script other than a print statement, for example:

my $address = "someValue"

… then the HTML page is not running the script but instead it is downloading it. What do I have to do to make this script work? I just need an IP address to appear on the Web page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:20:09+00:00Added an answer on June 3, 2026 at 2:20 pm

    Try to run your cgi script in the command line:

    perl -c my_script.cgi
    

    and if it is ok, try to run using strict and warnings activated.

    #!/usr/bin/perl
    use strict;
    use warnings;
    use diagnostics;
    

    If there is no problem, look into the error log.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to edit XML files on a small Linux box that we have
i need small script in python. Need to read custom block in a web
I need to write a small console app (patch) that turns off the print
I have a need to run a relatively large number of virtual machines on
I have a not-so-small class under development (that it changes often) and I need
I am developing small application in PHP that will need to store small number
I'm trying to improve the performance of a (virtual) web server with a fairly
I need small help. I have 2 lists( say A and B) which have
I am using SDL Tridion 2011 SP1. I need small clarification regarding multimedia schema
I often need relatively small (<10000 entries <1kb) caches for speeding up calculations. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.