apache cache issue

Problems with the Windows version of XAMPP, questions, comments, and anything related.

apache cache issue

Postby foyleman » 23. March 2009 21:58

I am experiencing an odd issue in relation to form caching and apache. I apologize if this has been answered before but I did not find any direct results in the search.

I have installed Uber-Uploader (a php and perl large file uploading system) and have it working.

However, when I submit form variables with my upload they are not refreshed. But, if I stop and start apache, the results will be refreshed for the next post.

I tried clearing browser cache without results. And since stopping and starting apache solves the issue, I am thinking it has something to do with a cache somewhere.

This is so far only happening on my Windows XP installation of xampp and not on a linux installation of cent os.
I have installed the Perl addon for xampp.

I'd appreciate any assistance in figuring out why the form post results aren't refreshing.
foyleman
 
Posts: 5
Joined: 23. March 2009 21:49

Re: apache cache issue

Postby Izzy » 23. March 2009 23:13

I don't know anything about your script and how it is configured but as you most likely know already their forum is the best place for help.
http://sourceforge.net/forum/?group_id=148921


If your script requires PHP configurations then they are defined in the xampp\apache\bin\php.ini file.

Open in a text editor and search for cache and session etc.

Perhaps read the PHP manual about caching and sessions, how they work.


Backup the php.ini file before editing.
Save the file after editing.
Restart Apache after editing and test your script again.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: apache cache issue

Postby foyleman » 24. March 2009 12:21

Thanks. Last time I posted on their forum and mentioned I was using xampp, I wasn't too well received. I understand the benefits of serving on linux, but I also understand the benefits of testing on xampp.

I already went through the cache folders and there was nothing in there. I deleted my browser cookies and sessions.
I just now tested the same script in FireFox and the POST values did not change. I switched to IE and my POST values were the same as that which I entered into FireFox.

Definitely an issue of caching something somewhere that is resolved by restarting apache.

I will try and figure out the cause and post back if I ever get a resolution. Otherwise I will just have to go back to linux.
Thanks.
foyleman
 
Posts: 5
Joined: 23. March 2009 21:49

Re: apache cache issue

Postby Nobbie » 24. March 2009 12:37

foyleman wrote:Definitely an issue of caching something somewhere that is resolved by restarting apache.


There is no caching of post variables in Apache.

That must be an issue of that special upload script.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: apache cache issue

Postby foyleman » 24. March 2009 13:01

Nobbie wrote:There is no caching of post variables in Apache.

That must be an issue of that special upload script.

Even though the same issue does not occur when I upload the same script to my centos server not running xampp?

The only variables that are changed between server locations with the upload script is the definition of where the temporary upload folder is located. Changed from C:/xampp/htdocs/files/temp/ to /home/foyleman/www/files/temp/

Example script that is working temporarily in case you care to see: http://www.foyleman.com/files/Uploader/

The problem is the first text input field doesn't get forgotten when using xampp until I restart apache.

The script:
- form starts it off upon submit
- writes the input data to an xml (###.redirect) file along with all other variables while the file is uploaded via perl script
- when the upload is complete, page is redirected to another php script that reads the xml, handles the files if you want and deletes the xml temporary file (deletion confirmed).

results:
- file is uploaded
- no temporary xml file where it is supposed to be, but it was written and deleted (confirmed)
- some how it only remembers the first values I ever put into text input fields since the last time I started apache regardless of browser.

btw: If this is the only problem I ever have with xampp, I am still quite happy to have it available as a testing environment. It's a great program... the best for such purposes of which I am aware. I post this problem not only for my own assistance, but also for anyone else who ever runs into a similar situation.
Thank you all for your replies regardless of whether they reach a solution.
foyleman
 
Posts: 5
Joined: 23. March 2009 21:49

Re: apache cache issue

Postby foyleman » 24. March 2009 13:28

I am narrowing down the issue.
It appears it might have something to do with perl and caching of sub routines.
The first time I run the script, I have a few errors in one of my log files that reads
Code: Select all
ubr_upload.pl: Variable "$remove_temp_dir" will not stay shared at C:/xampp/htdocs/cgi-bin/ubr_upload.pl line 410.


Some searching and debugging has put the problem on perl script. This doesn't explain why it doesn't work in xampp but does elsewhere... but it's a good start.

A debug message:
Variable "$remove_temp_dir" will not stay shared at
C:/xampp/htdocs/cgi-bin/ubr_upload.pl line 411 (#1)
(W closure) An inner (nested) named subroutine is referencing a
lexical variable defined in an outer named subroutine.

When the inner subroutine is called, it will see the value of
the outer subroutine's variable as it was before and during the *first*
call to the outer subroutine; in this case, after the first call to the
outer subroutine is complete, the inner and outer subroutines will no
longer share a common value for the variable. In other words, the
variable will no longer be shared.

This problem can usually be solved by making the inner subroutine
anonymous, using the sub {} syntax. When inner anonymous subs that
reference variables in outer subroutines are created, they
are automatically rebound to the current values of such variables.


Another:
Use of uninitialized value $file_handle_version in concatenation (.) or string
at C:/xampp/htdocs/cgi-bin/ubr_upload.pl line 812 (#3)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl will try to tell you the
name of the variable (if any) that was undefined. In some cases it cannot
do this, so it also tells you what operation you used the undefined value
in. Note, however, that perl optimizes your program and the operation
displayed in the warning may not necessarily appear literally in your
program. For example, "that $foo" is usually optimized into "that "
. $foo, and the warning will refer to the concatenation (.) operator,
even though there is no . in your program.


I'll have to come back to all this later with a clearer head.
foyleman
 
Posts: 5
Joined: 23. March 2009 21:49


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 112 guests