Perl CGI script returns different results depending on the launch

I have a Perl CGI script that seems to randomly emit different HTML. None of the inputs change. For example, I will run wgettwice and get two different results. CGI is supported by the development database, which also does not change.

I have a debug statement that tells me that from a DB, the same number of elements is returned in a script.

Honestly, I am puzzled. Logic, DB and inputs do not change, but the output is performed.

http server - apache2 on Ubuntu 10.04. Perl version - perl 5.10.

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

edit2: some of the failed starts look like previous versions of the script. I don't think Apache is CGI caching, but it looks like it can capture legacy cache versions ....

+3
source share
2 answers

Is your CGI script executed using the standard Apache CGI API or is it executed in mod_perl using the CGI Apache :: Registry emulation level (or ModPerl :: Registry in Apache2)?

I saw an effect similar to the one you are describing, which is related to how mod_perl CGI emulation works. Details are discussed here .

- "" , script, "my" "" "".

, - - .

+2

: Apache, , , . ( 0 ).

: - CLI script, , , HTML- . , Content-Type .

CLI, CGI -, , Apache - .

0

Source: https://habr.com/ru/post/1752906/


All Articles