Page 1 of 2

Downloaded zip files won't open

Posted: 08 Jan 2012, 10:51
by ScorpiousDelectus
I'm having issues with downloaded zip files from registered accounts not being valid and not opening. The zip extension is an allowed download file type so I'm not sure what's going on. Please advise.

Re: Downloaded zip files won't open

Posted: 08 Jan 2012, 14:10
by SonRiab
Maybe this thread is helping you: viewtopic.php?f=31&t=17104
If not, please create a file with the posted code, edit the file to match one of your zip-files, upload it to your Joomla root directory and open the file in your browser. What is the result?

Re: Downloaded zip files won't open

Posted: 09 Jan 2012, 14:40
by ScorpiousDelectus
I followed the instructions in the last post of the thread you linked to (copied code to a file called text.php, uploaded test.php to the root directory and then downloaded one of the zip files directly via the pathway in the browser - /phocodownload/ etc etc). After the file downloaded, the zip file opened fine and the files within it extracted and opened.

Thoughts?

Re: Downloaded zip files won't open

Posted: 09 Jan 2012, 16:39
by SonRiab
What is the result if you open test.php in the browser?

Re: Downloaded zip files won't open

Posted: 11 Jan 2012, 16:25
by ScorpiousDelectus
I've typed in thinker.com.au/test.php and I get a file not found error (404). I've double checked and there is definitely the test.php file in the root folder (public_html)

Re: Downloaded zip files won't open

Posted: 11 Jan 2012, 16:40
by SonRiab
You named it text.php and you have to modify the filename and path here to an existing one:

Code: Select all

$fileSize = filesize("./phocadownload/Tuyet Trang San Ga - Trinh Tuan Vy.mkv");

Re: Downloaded zip files won't open

Posted: 12 Jan 2012, 01:51
by ScorpiousDelectus
It was named text.php, I have renamed it now but Tuyet Trang San Ga - Trinh Tuan Vy.mkv doesn't exist anywhere in that folder. Thing is, when I go to thinker.com.au/test.php, I get this:

Error: [2] filesize() [function.filesize]: stat failed for ./phocadownload/Tuyet Trang San Ga - Trinh Tuan Vy.mkv
Ending Script

What is supposed to happen?

Re: Downloaded zip files won't open

Posted: 12 Jan 2012, 08:12
by ScorpiousDelectus
Ok, the penny has dropped. I had a look at the code again and realised that I needed to amend it so that it applies to my situation.

After running test.php, I get the following:

Content-Length: 257825444
Content-Range: bytes 0-257825443/257825444

Re: Downloaded zip files won't open

Posted: 12 Jan 2012, 17:06
by SonRiab
Is the content length (in bytes) correct? I personally can not check it because I haven't the file. Or if you don't know how to check it you can provide a link to the file and I will check it (also a PM is possible if you don't want to post a link to the file here!). And do you take a file which would be corrupted when downloading with PD?

Re: Downloaded zip files won't open

Posted: 13 Jan 2012, 02:40
by ScorpiousDelectus
Yes, the size is correct right down to the last byte.