Title: PDF File Read error
Last modified: August 21, 2016

---

# PDF File Read error

 *  [Sam](https://wordpress.org/support/users/sammazza/)
 * (@sammazza)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/pdf-file-read-error/)
 * My erro log shows an error when users try to access a PDF file.
    I have uploaded
   the file to an UPLOAD folder wp-content/uploads/2014/01/gwcc-bylaws.pdf. I get
   this error in the log:
 * [09-Mar-2014 23:52:38 America/Denver] PHP Warning: readfile(www.gwcc.org.nz/wp-
   content/uploads/2014/01/gwcc-bylaws.pdf): failed to open stream: No such file
   or directory in /home4/thefarmn/public_html/gwccorg/gwcc-bylaws.php on line 10
 * my php file:
    <?php header(“Pragma: public”); header(“Expires: 0”); header(“Cache-
   Control: must-revalidate, post-check=0, pre-check=0”); header(“Cache-Control:
   private”,false); if (true) { // (!Operating_System_Is_IOS) header(“Content-disposition:
   attachment; filename=gwcc-bylaws.pdf”); } header(“Content-type: application/pdf”);
   readfile(“www.gwcc.org.nz/wp-content/uploads/2014/01/gwcc-bylaws.pdf”);
 * ?>
 * When I test it seems to work.
    In other places on my site I think I just insert
   an hyperlink to the file instead of using the PHP for access. When I test (PC/
   Windows XP chrome) both seems to work.
 * Any help would be appreciated. Is it the PHO file? Do I need to do something 
   special for different browsers? different OS? Should the URL be replaced with
   a directory/file location instead?
 * Thanks.

The topic ‘PDF File Read error’ is closed to new replies.

## Tags

 * [file](https://wordpress.org/support/topic-tag/file/)
 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [read](https://wordpress.org/support/topic-tag/read/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Sam](https://wordpress.org/support/users/sammazza/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/pdf-file-read-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
