Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Apache 2.0.40 appears to be caching requests

I have a Perl/CGI script where users enter a few details such as hostname, username etc and it FTP's files to the specified server.

This was running fine with Apache 1.3.x

What happens now is when the form is submitted, there is about 10 lines of output and then nothing else.  The script still runs in the background as I can see the activity with tcpdump.  The script essentially outputs data everytime a file is uploaded.

I use the Net::FTP module and have debugging turned on.  Looking in the web server logs, there are no entries while it FTP's the files and when it finishes, the webserver log is filled with all the debug output.  This all leads me to believe that Apache is caching the output, however I can not see any obvious configuration option to change this.

The Perl script has Perl's buffering turned off with $|=1;


Suggestions please.
0
Tintin
Asked:
Tintin
  • 5
  • 3
1 Solution
 
TintinAuthor Commented:
Will also add that I have no caching or proxy options enabled.
0
 
TintinAuthor Commented:
Another thing.  If I run the script from the command line, the output is continuous, ie: no buffering or caching.
0
 
TintinAuthor Commented:
I know I'm doing a lot of replies to myself, but I've managed to get the script to output correctly if I turn off debugging in Net::FTP

However, I'd still like to know why????
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
TintinAuthor Commented:
I've read through the PAQ's you listed, but they all relating to caching and not the problem I had.

I probably should have used the term buffering rather than caching, as that is a more acurate description of the problem I was having.
0
 
samriCommented:
Tintin,

Yes I do agree with you on the buffering problem.  Somehow, it might be happening to how apache might be caching the output (in memory maybe).  I do not have much technical knowledge to explain, but some people said that adding a custome header to the request may solve the problem.

<IfModule mod_headers.c>
Header set Pragma: no-cache
Header set Cache-control: "max-age=0, must-revalidate"
Header set Expires: "Sat 02 Apr 1977 17:15:00 GMT"
</IfModule>

Perhaps you might want to give it a shot first (Apology if you'd already did try that).

cheers.
0
 
TintinAuthor Commented:
I'd forgotten about this question, but I didn't eventually find a solution (although I can't remember what I actually did).

I appreciate the effort, so I'm awarding the points anyway.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now