PaFileDB Don't Want To Download Big Files :S »  Show posts from    to     

Icy Phoenix


Old Support Topics - PaFileDB Don't Want To Download Big Files :S



tiolalu [ Mon 04 Jun, 2007 10:30 ]
Post subject: PaFileDB Don't Want To Download Big Files :S
Hi!

I upload a 10M file, the file uploads correctly, it's in the server, in uploads directory, and in the DB there is the file linked to the correct name. But, if you try to download it shows:
404 File Not Found: The File X.rar does not exist.

What's happends?

TIA!
PD: With a 5Mb file it works perfectly, with a 8Mb file it doesn't.


Aexo [ Mon 04 Jun, 2007 20:39 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
if it's a 404 error, don't exist the file. Comprobate all the letter, the mayus. the Ñ, etc and the http://


tiolalu [ Mon 04 Jun, 2007 22:10 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Hi!
tiolalu wrote: [View Post]
the file uploads correctly, it's in the server, in uploads directory, and in the DB there is the file linked to the correct name.

So I don't have to put any http or check characters because the system automatically generate one .


moreteavicar [ Fri 08 Jun, 2007 13:57 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Are you still having problems?
I know that some hosts may place limits on the size of files can be downloaded... as you say, 5Mb is ok, but not 8/10Mb.

Quote:
So I don't have to put any http or check characters because the system automatically generate one

Pafiledb never stores the uploaded file using its orignal name, but uses randomised MD5 to rename the file to a random string on disk - this is to stop people loading executable files and trying to run them (an obvious security hazard).

Pafiledb will record that original file name and associated ranmdom name in SQL, so that when you click download, it will refer to that random sting, but replace it with the real name on the client browser (I had to do a fix here because it didn't append quotation marks, and unlike original mozilla browser, firefox can't handle filenames without quotation marks!). Consequently even if the file appears in pafiledb as being uploaded on the system, what you need to do is check the pafiledb/uploads directory on your site, and see if the file is really there (simply by looking for a file that is 8/10Mb). If it is, try downloading that file directly by calling it from the browser -e.g. www.yoursite.com/pafiledb/uploads/3...42e5fc4cb6.zip. If you can download without problems, then pafiledb might have a corrupted record of the randomised filename, if you cannot, then the problem is likely to be a host account file limit.


tiolalu [ Fri 08 Jun, 2007 15:23 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Hi!

Thanks for answering. I get this error when trying to download any file of pafiledb/uploads/

Forbidden
You don't have permission to access /pafiledb/uploads/X.zip on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


I had checked before ask here the file in the server, and the associated random name and they are ok.
Also, if I upload a very big file (500 MB) I can download it, so I have no problems for it...


moreteavicar [ Fri 08 Jun, 2007 16:51 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Sorry I'm confused a little. Do you mean that you can see the files are in the pafiledb/uploads/, but that if you try to access them directly (rather than pafiledb) you still get the error?

If this is the case, check the permissions of the files you are trying to access - are they 644? A permissions error can come about, if for example, you are using linux, not just as host, but also your home/client computer, and if you are logged in as root, the files will have root ownsership. Uploading to a linux/unix environment will preserve the file ownership, so apache will not allow access to the files. That is not to say this is the exact cause here (i.e. that you are root), but permissions are preserved if going linux>linux server, or windows>windows server, but not windows>linux server, as the two differ. The last case is the most common way files are transferred, i.e. more people use windows, whilst most servers are linux - the reason they don't see any permissions problems is because file ownership doesn't exist in windows (closest is the "system" bit) and so the linux file system assigns them as 644 - i.e. everyone can access them.


moreteavicar [ Fri 08 Jun, 2007 16:53 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Hmmm, checking you're profile... you're using XP, so that rules out the above.. except check the permissions of the files anyway!


tiolalu [ Fri 08 Jun, 2007 17:05 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
The permissions are 666 to all files, but I think this folder is protected... by .htaccess? .

Ok, I will explain again.
If I upload by ftp a 50 MB file and I give the http direction to people they can download it with no problem.
If I upload a (until) 5 MB by pafile MOD all goes well, the file is in the server with a random name, the database has it and you can download without problem (through the pafile MOD), but you cannot access by direct linking.
If I upload a 8 MB or more by pafile MOD, the file is in the server with a random name, the database has it, but when you try to download it through the pafile MOD it says the file don't exist. Also you cannot access by direct linking.

Hope now is well explained.
Thanks!


moreteavicar [ Sat 09 Jun, 2007 01:56 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Hmmm... I'm going to back-track and ask the obvious, have you set pafiledb to unlimited filesize? Under downloads>>configuration (Maximum filesize)?
If that is set to 0, then we're back to the php server file limit (which is what I suspect anyway). What confused me is that you said you uploaded big files, but this was via ftp - you can upload files by ftp of any size, but that is a different thing to file transfer via php!

To check the limit set in php, go into ACP>>Info>>phpinfo

look for the line "upload_max_filesize"

Often this is set to 5M by default during php install, and hosts don't usually bother changing it, so most likely this has been the problem all along!


tiolalu [ Sat 09 Jun, 2007 12:46 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
I have in the ACP to 20 MB limited and in php_info to 15 MB, but by php.ini limited to 20 MB (I have talked with hosting about it).

Thanks for all efforts moreteavicar!!


m740 [ Thu 20 Mar, 2008 21:06 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Solved:

OPEN /pafiledb/modules/pa_download.php
FIND
Code: [Hide] [Select]
if($size > (1048575 * 6))

REPLACE WITH
Code: [Hide] [Select]
if($size > (1048575 * 16))




This problem also occurs in the current version 1.2.0.27


ThE KuKa [ Thu 20 Mar, 2008 21:21 ]
Post subject: Re: PaFileDB Don't Want To Download Big Files :S
Thanks m740 to SOLVED (edit title)


moreteavicar [ Fri 21 Mar, 2008 01:59 ]
Post subject: Re: SOLVED - PaFileDB Don't Want To Download Big Files :S
Nice one, m740




Powered by Icy Phoenix