?
Solved

Apache 2.0.40 appears to be caching requests

Posted on 2003-03-02
8
Medium Priority
?
296 Views
Last Modified: 2010-03-04
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
Comment
Question by:Tintin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 48

Author Comment

by:Tintin
ID: 8055303
Will also add that I have no caching or proxy options enabled.
0
 
LVL 48

Author Comment

by:Tintin
ID: 8055363
Another thing.  If I run the script from the command line, the output is continuous, ie: no buffering or caching.
0
 
LVL 48

Author Comment

by:Tintin
ID: 8055371
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 48

Author Comment

by:Tintin
ID: 8056006
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
 
LVL 15

Accepted Solution

by:
samri earned 600 total points
ID: 8056260
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
 
LVL 48

Author Comment

by:Tintin
ID: 9221186
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question