We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21635
    • 81 Posts
    It should not work if it is not binary.

    well it does for me. strange. thanks boombana to bring this up again, feels good not being alone with that issue.

    what server do you run, jason?

    any chance to test it with a everyday hosted v-server?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: nklsf at Aug 06, 2010, 10:18 AM

      what server do you run, jason?

      any chance to test it with a everyday hosted v-server?
      I test on OS X 10.6.4 (using PHP 5.3.2/MySQL 5.1.47 from MacPorts), IIS7/PHP 5.2.14 + MySQL 5.1.49 on a Win7 VM, a physical CentOS server with PHP 5.2.6 + 5.0.83, and an Ubuntu VM.

      I’ll do some more in-depth debugging on this today and get this straightened out if I can.
        • 21635
        • 81 Posts
        I’ll do some more in-depth debugging on this today and get this straightened out if I can.

        thanks a lot. your dedication is much appreciated!
          • 3864
          • 16 Posts
          nklsf, which version of apache and php are you using?

            • 21635
            • 81 Posts
            Quote from: boombana at Aug 08, 2010, 08:37 PM

            nklsf, which version of apache and php are you using?

            Apache/2.2.16 •• PHP 5.2.11
            this one is a domain-factory (df.eu)hosted server

            i also tried it on an allinkl.com-webspace, which runs PHP 5.2.12, can’t see the apache-version, though. didn’t work.


            it worked on my local MAMP (Apache/2.0.59 (Unix) •• PHP 5.2.6)
              • 3864
              • 16 Posts
              Quote from: nklsf at Aug 09, 2010, 02:25 AM

              Quote from: boombana at Aug 08, 2010, 08:37 PM

              nklsf, which version of apache and php are you using?

              Apache/2.2.16 •• PHP 5.2.11
              this one is a domain-factory (df.eu)hosted server

              i also tried it on an allinkl.com-webspace, which runs PHP 5.2.12, can’t see the apache-version, though. didn’t work.


              it worked on my local MAMP (Apache/2.0.59 (Unix) •• PHP 5.2.6)

              Thanks for replying and sorry for the delayed reply. I’m still unable to get PDFs to load when the binary option is checked in the content type definition. I’m running PHP Version 5.2.13 & Apache/1.3.42. The only thing that I can spot that looks different to my working servers is in the php configuration. apxs is enabled on the working servers but not on the problem server. Do you have apxs enabled?
                • 21635
                • 81 Posts
                apxs is enabled on the working servers but not on the problem server. Do you have apxs enabled?
                well, same for me here. both hosted servers don’t have apxs, my local MAMP does.
                i’ll ask one of my providers, if they could enable it, so we can have a look.

                besides that, i never used/got in touch with apache extensions, don’t even know if it could have an impact on this issue.

                still, thanks for the hint
                  • 9207 ☆ A M B ☆
                  • 2,475 Posts
                  Does this apply to Revo 2.0.0-pl? The need to create a *mostly* empty template isn’t optimal.... is this something that will be changed later? In my mind, if I have a content disposition of "Attachment" and a content type of PDF, then that should make the template arbitrary, because I’d expect custom headers to be sent that would bypass anything in the template. Or is it the action of rendering a template that actually causes the headers to be generated and sent?
                    • 25636
                    • 21 Posts
                    I’m also experiencing this issue.

                    A Static Resource with a PDF Content Type (mime = application/pdf, ext = .pdf, binary = checked) returns the modx error page set in my System Settings.

                    If I uncheck binary, a link to the resource will start the PDF download but the resulting download is corrupt.

                    Currently, I’m just linking directly to the pdf asset instead of the resource.

                    In there any update on this?

                    Linux 2.6.32.8-grsec-2.1.14-modsign-xeon-64, PHP 5.2.14, MySQL 5.0.51a(client) 5.1.39-log (server), --with-pdo-mysql, Firefox/3.6.12
                      Linux 2.6.32.8-grsec-2.1.14-modsign-xeon-64, PHP 5.2.14, MySQL 5.0.51a(client) 5.1.39-log (server), --with-pdo-mysql, Firefox/3.6.12
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: Everett at Aug 25, 2010, 01:48 PM

                      Does this apply to Revo 2.0.0-pl? The need to create a *mostly* empty template isn’t optimal.... is this something that will be changed later? In my mind, if I have a content disposition of "Attachment" and a content type of PDF, then that should make the template arbitrary, because I’d expect custom headers to be sent that would bypass anything in the template. Or is it the action of rendering a template that actually causes the headers to be generated and sent?
                      It should work with a minimal template (i.e. just the [[*content]] tag), or without a template. Being a binary Content-Type controls the headers, though Static Resources can handle streaming much larger binary files to the browser (non-static Resources are loaded fully into memory).

                      One note for those having problems, if you do use a template, make sure you do not have a carriage-return after the [[*content]] tag.