Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2012
    Location
    South Africa- Krugersdorp
    Posts
    29
    Plugin Contributions
    0

    Default Working With Pdf's

    Hi All, it's not hard to know more than me, I read a lot, but cannot find my solution, Here is my Battlefield of the last few weeks
    VPS Server 18.04
    Zencart 1.5.7 and 1.5.7a
    My Website www. macspares DOT co DOT za
    PHP 7.2
    readwrite is enabled

    My Problem is I cannot get PDF's from the EZ-Pages to Display or even just to Download

    I have been using Zencart since 1.3.7 but recently had to upgrade the VPS from Ubuntu 14 to current.
    A Few Weeks ago we noticed that the html in the EZ-Pages was serving 404 errors for pdf Documents
    here is a copy one one:

    <p><a href="var/www/mywebsite.co.za/images/extras/diagrams/600-1000V-LV-Cable.pdf" target="_blank">AC Current Ratings : 600-1000V LV Cable</a></p>

    here is the error on 1.5.7 :: ERROR 404 - Not Found!
    here is the error on 1.5.7a :: ( the site is called "newco.co.za" a basic Zencart with demo products and is not published )
    The requested URL was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/2.4.29 (Ubuntu) Server at newco.co.za Port 80


    In the prior weeks I have blamed the VPS and then the Zencart upgrades Maybe the Html ?
    There is no indication in the VPS Logs or the Zencart Logs, I have even tried "Strict Error Reporting "

    Another snippet of information is I have " Front Accounting" that regularly and continuously serves PDF's as invoices as well as Pdf's into emails from the same container

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Working With Pdf's

    first, you need to adjust the .htaccess in the images folder to allow the loading of pdf files from the images folder, it does not by default
    Second the following (/var/www is wrong):
    Code:
    <a href="var/www/mywebsite.co.za/images/extras/diagrams/600-1000V-LV-Cable.pdf" target="_blank">
    should be
    Code:
    <a href="http://www.macspares.co.za/images/extras/diagrams/600-1000V-LV-Cable.pdf" target="_blank">
    if that is actually the file path to that pdf
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: Working With Pdf's

    As a suggestion, you might want to create a new folder (called, say, "/pdfs") and put your PDFs in there, instead of putting them in the images folder.
    Copy the .htaccess and index.html files from images and adjust .htaccess as noted above by @barco57.

    Second suggestion - if you're using target="_blank", also use rel="noreferrer noopener"
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Mar 2012
    Location
    South Africa- Krugersdorp
    Posts
    29
    Plugin Contributions
    0

    Default Re: Working With Pdf's

    Pew . . . I got the heavy hitters . . Thanks
    Barco57
    Thanks, I did not even know I had a .htaccess in the images folder( and I looked all over for it ) , with the code correction and sorting out the PDF in the .htaccess the problem is sorted .

    swguy
    YES I agree the website has gone thru many upgrades and the images folder is very bloated . . . .With this upgrade I am trying to reduce the historical errors and your advice will be followed.

    Thank you

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: Working With Pdf's

    Adding PDFs with instructions, documentation, addition info, etc. is a great way to make your site more informative. Good luck!
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v139c PDF not working anymore
    By kitu53 in forum General Questions
    Replies: 2
    Last Post: 26 May 2015, 01:10 PM
  2. v139h PDF Dowload not working
    By awebb-designer in forum Basic Configuration
    Replies: 15
    Last Post: 31 Jul 2012, 05:34 AM
  3. Trouble with downloadable PDF files
    By jgold723 in forum General Questions
    Replies: 1
    Last Post: 15 Sep 2011, 03:57 AM
  4. EZPages Link to PDF not working
    By ranger_lp in forum General Questions
    Replies: 1
    Last Post: 19 Jul 2010, 04:07 PM
  5. Banner url links to a pdf not working in Firefox
    By ellivir in forum General Questions
    Replies: 0
    Last Post: 22 Jun 2010, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR