We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36782
    • 109 Posts
    Hi there,
    I've got a strange one here...

    Using ModX 2.2.5
    Apache, cloudLinux, etc.
    This, I think, is not a version specific thing.

    There's a site I work on which offers PDF version of user manuals for their products for download.
    Hosting support said that they're using too much bandwidth.. and this:

    "PDF file downloads are not an issue as long as they are served not by PHP but linked directly using Apache, PHP is not designed to be serving files which may bring in those issues. "

    er...what?
    I'm stupid when it comes to server stuff. Does anyone know what she's talking about? How are they being 'served' with php? (if they are...)

    http://www.tuffcitypowersports.com/manuals-and-guides/shop-manuals.html

    I mean... they're just links to files on the server. What is 'served with PHP' in this context?

    Is there some way that I'm missing that Modx needs to link to these?

    Best,
    -Gabriel
    • PHP can be used to stream the files rather than having links to directly download the files. But I fail to see how that would have any effect on bandwidth; in either case the file's bits get moved. And as you said, you're not doing that, you're just linking to the files directly.

      In your case, it looks like you just have some big files. 86 and 97MB is a lot. Since your hosting appears to have rather stringent bandwidth limits, you may want to consider hosting your files on a file-hosting service; Google will help you find one that suits.

      http://www.computerworld.com/s/article/9228869/10_file_sharing_options_Dropbox_Google_Drive_and_more
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36782
        • 109 Posts
        Thanks Susan,
        Yeah, pretty much what I suspected. They do seem to be sharing some big files there. I suggested that to my clients. Then the helpful support staff just really confused me with that comment on 'serving PDF with PHP', and I thought I would check if there's some Modx-Specific content setting or other weirdness. Shot in the dark really smiley

        cheers.

        -Gabriel
        • Quote from: unsub777 at Mar 13, 2013, 08:38 PM

          er...what?
          I'm stupid when it comes to server stuff. Does anyone know what she's talking about? How are they being 'served' with php? (if they are...)

          Mmm, sounds like nonsense to me. You could be generating the PDFs dynamically using PHP, but that would increase server CPU load and not bandwidth (unless it was generating really bloated PDFs). In your case though, those look like plain ol' links to plain ol' files on the server, so when someone clicks on one there's no PHP involved.

          However... Some of the PDFs on there really are massive, PHP or not. That HISUN 500cc EFI, 600cc EFI and 700cc EFI ATV Shop Manual is close to 90MB. It's because the whole thing is raster images. Somebody needs to OCR that stuff and make real text versions. Or re-export the PDF using better settings if it's already in some sort of digital format. (Converting the schematics to vector illustrations wouldn't hurt either, but the text is an easy win). They'd be an order of magnitude smaller and more useable too, since now the "text" isn't searchable and gets pixelated when you zoom in. Some of the PDFs are already done like this, like the Motorino scooter ones.

          Also some of the images are much bigger than they ought to be. Like the SYM Wolf Classic 150cc over in the left side bar is a 422KB, 1024x768 pixel image that's being used at 127x96. Properly sized it should be around 10KB.

          Those things add up pretty quickly to big bandwidth if the site gets a lot of traffic, especially first-time visitors. [ed. note: jgrant last edited this post 11 years, 1 month ago.]
            Extras :: pThumbResizerimageSlimsetPlaceholders
            • 36782
            • 109 Posts
            I meant to reply to this sooner.
            Thank you, you were right - and I should have noticed that, too. Some were small, and those must have been the ones I looked at.

            So thanx for the reply smiley

            -Gabriel