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 919917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:37:24+00:00 2026-05-15T18:37:24+00:00

I have a Perl CGI script that emits different HTML apparently randomly. None of

  • 0

I have a Perl CGI script that emits different HTML apparently randomly. None of the inputs change. E.g., I will run wget twice and get two different results. The CGI is backed by a development database that, too, doesn’t change.

I have a debug statement that informs me that the same number of elements are returned from the DB into the script.

Frankly, I’m mystified. Logic, DB, and inputs don’t change, but the output does.

The http server is apache2 on Ubuntu 10.04. Perl version is perl 5.10.

edit: whenever I run it from the command-line on the server, the output is correct.

edit2: some of the bad runs seem like prior versions of the script. I don’t think Apache is caches CGIs, but it seems like it might be grabbing out-of-date cache versions….

  • 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-05-15T18:37:24+00:00Added an answer on May 15, 2026 at 6:37 pm

    Is your CGI script being run using Apache’s standard CGI API or are you running it under mod_perl using the Apache::Registry (or ModPerl::Registry in Apache2) CGI emulation layer?

    I have seen an effect similar to the one you describe, which results from the way mod_perl’s CGI emulation works. The details are discussed here.

    One workaround is to take any ‘global’ variables declared at the start of the script with ‘my’ and change the keyword ‘my’ to ‘our’.

    Of course your problem may be something completely different – it’s very hard to say without more information.

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

Sidebar

Related Questions

I have a perl cgi script that's fairly resource intensive (takes about 2 seconds
I currently have a Perl CGI script that parses incoming XML requests using XML::Simple
I have a script that's written in perl, and executed as CGI. It works
I have a Perl CGI script that creates a login screen, i.e. user name
I have a perl script that uses the CGI::Session::Drive::memcached, but I want to be
What should you call after printing HTML from a Perl CGI script? I have
I have a thirdparty script that I don't want to rewrite in CGI/Perl, so
I have a Perl CGI script that isn't working and I don't know how
I have a CGI script in Perl that generates HTTP error pages by itself.
I have a perl CGI script that needs to have a specific extensionless filename

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.