Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to download large uploaded file 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi there,

A while back, I wrote a file upload script which has worked fine for file uploads less than 12MB (a limit I set via a php.ini file). I've now increased the limit to 30MB and files still upload without a problem. When a file is uploaded an email is generated which contains a URL corresponding to the location of the uploaded file. Normally when a file has been uploaded, clicking the email link initiates the download in a web browser.

To test the new 30MB filesize limit, I uploaded a 29MB file successfully but when clicking the email link to download the uploaded file, the server consistently issues a 403 (Forbidden) error page instead of allowing the file to be downloaded.

I can download the file via an FTP client so I know it's not a problem with the file itself.

Would there be some setting in php.ini which is limiting the size of downloadable files? If not, can anyone suggest a likely reason for this behaviour?

Your advice would be much appreciated!

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Hi Clive,

this has got to be a permissions issue.

remember ftp and http don't need to use the same permissions and you will be accessing the file (probably) using http. does the relevant directory have any .htaccess files in it? or is it controlled in httpd somewhere (am assuming you are using apache but the same is true for other webservers in concept)?

i am also assuming that the download link is a direct link to the file and not via a script. if this is the case then php will be unlikely to be intermediating and GET request so it is most likely to be a plain permissions issue.

Justin

 
Hi Justin,

Thanks for the reply. You hit the nail on the head! I'd checked folder permissions but not the permission of the 30MB file itself - which happened to be set to 600. A 644 did the trick (the file is now downloadable)! I'm definitely in need of some caffeine or a good night's sleep!!!

Many thanks,

Clive

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top