Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Apache V2.1-1 corrupting files, PDF and XLS

JoeDink
Occasional Contributor

Apache V2.1-1 corrupting files, PDF and XLS

Hello,

I have upgraded to VMS 8.3 on our Alpha 4100, and installed various VMS and Multinet patches. I then installed Apache V2.1-1 on an ODS-5 disk and installed the CSWS211_UPDATE V1.0 patch. Previously we were running Apache CSWS version 1.3 on an ODS-2 disk with no problems. I got the new version Apache web running and VMS authentication working. [Apache/2.0.52 (OpenVMS) Server]

However, the problem is with serving files of any size, approx over 10 blocks, PDF or XLS. This does not apply to TXT files which are served fine. These files reside on an ODS-2 disk, but I don't think that should be a problem. This sounds like a problem reported for earlier versions of Apache but fixed by later versions and patches. I get different errors from IE and Safari browsers, but after researching it appears to me that Apache is corrupting the file when it serves it. There are no entries in the Apache logs, loglevel=debug, showing this problem.

What I've done:
(1) In HTTPD.CONF I load the headers_module
LoadModule headers_module modules/mod_headers.exe
and incorporated the 'Header unset Accept-Ranges' directive in my individual '/directory' sections.

(2) In HTTPD.CONF the EnableMMAP directive is set to off which should remove the Stream-LF restriction.

(3) I tried running the server on only port 443 with a Verisign certificate (which is what we usually do), and I tried it with a self-signed certificate. I tried running it on port 80 only, not including ssl_conf. The problem occurs regardless.

I can retrieve the PDF or XLS files via FTP with no problem.

I'm stumped. I've been working on this for over a week, and the villagers are circling the castle. Has anybody experienced this problem? If anybody can throw me bone, I would appreciate it. Thanks.

JoeDink
5 REPLIES
Hein van den Heuvel
Honored Contributor

Re: Apache V2.1-1 corrupting files, PDF and XLS

Joe,

Welcome to the ITRC OpenVMS Forums.

It may help figuring out what is going on to the bytes when the file is 'corrupted'.

Start with a DIR/FULL on a sample input file. Now access through appache and save.
Transfer back to OpenVMS with FTP in IMAGE mode.
Start comparing the bytes using DUMP /BLOCK=(COUNT=1, START=x)...

DUMP/HEAD/BLOC=COUNT=0 can tell you the exact EOF bytes, as F$FILE(file,"EOF")
together with F$FILE(file,"FFB")

Also, have you tried marking the input files a 'fake binary':
$SET FILE/ATTR=(RFM:FIX,LRL=512,MRS=512)


Hope this help some,
Hein.
JoeDink
Occasional Contributor

Re: Apache V2.1-1 corrupting files, PDF and XLS

Thanks, Hein, for the reply. I can't open or save the file when accessing thru Apache. So, I cna't do a before and after comparison. Also, I have tried setting different attributes including your suggestion on a file, but the problem remains.

I should note that CSV files can't be served or saved either. These files would be text files but my MIME.TYPES file has the entry of "application/vnd.ms-excel csv". Maybe I'll fool around with the mime types and see if that makes a difference.

Desperate JoeDink
Willem Grooters
Honored Contributor

Re: Apache V2.1-1 corrupting files, PDF and XLS

2) In HTTPD.CONF the EnableMMAP directive is set to off which should remove the Stream-LF restriction

StreamLF is set OFF by default on SWS 2.1.

Can you give more data on this corruption ?Later today I'll dig my archives. IIRC, I had similar issues in the past but don't have at hand how I solved them.

I know there were some issues with file size but since you installed the pathc and are running 8.3, these should be solved.



Willem Grooters
OpenVMS Developer & System Manager
JoeDink
Occasional Contributor

Re: Apache V2.1-1 corrupting files, PDF and XLS

Thanks, Willem.

It's hard to determine the corruption because I can't really access the file thru Apache. However, I've received different error messages that point to corruption:

Firefox reported a -12263 error which is defined as "SSL received a record that exceeded the maximum permissible length". Got to a point where Adobe plugin tried to open the PDF file and reported it corrupted. IE gives the generic message of "The data area passed to a system call is too small." I was wrong earlier. TXT files can't be served either.

I have spoken with another computer center that also upgraded to VMS 8.3 and Apache 2.1-1. They report the same problem. However, the problem did not arise for them until after installing recent patches. Together we have been trying to determine if the VMS patch, "DEC AXPVMS VMS83A_SYS V5.0" is involved in the problem. Does anybody have Apache 2.1-1 working with VMS 8.3 that has the "DEC AXPVMS VMS83A_SYS V5.0" patch installed? Thanks.

JoeDink
Willem Grooters
Honored Contributor

Re: Apache V2.1-1 corrupting files, PDF and XLS

I checked the archive: we used a CGI-procedure to display files of any type, but not straight from a directory, but from another page. The URL containes a filename and it's mime-type, passed to a CGI-procedure, that contains the follwoing code for SWS:

$!
$ mcr apache$common:[000000]apache$flip_ccl.exe
$ write sys$output f$fao("CONTENT-TYPE: !AS!/!/",mime_type)
$ mcr apache$common:[000000]apache$dcl_bin.exe 'file'
$!

We could display virtualy ANY type of file, including Office documents of any type.

(I can no longer test this - I'm off the project now, and I'm not using SWS myself)
Willem Grooters
OpenVMS Developer & System Manager