Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Support / PFS Problem

12>>>

Not uploading most files

patriotfan
#1 2009-02-09 09:57
Hi.
I installed Cotonti for a little project of mine.
I am having a problem with PFS.
I will upload a file (.zip) and I get this:
"gnextop_theme.zip : This is not a valid zip file."
I have tried other files, and I get the same thing. I even reran the sql for the site and still no luck. It uploads images, but not zips.
My Cotonti powered site - [url=http://www.gnextop.patriotfan.co.cc]GnextopCenter[/url]
Brock
#2 2009-02-10 07:44
Are you trying files that are allowed in the extension types?
Web Design Database - www.wddb.com
dervan
#3 2009-02-10 09:39
now you can upload zip without subdirectories only

if you need to upload zip with subdirectories, then search in file system/mimetype.php for string
$mime_type['zip'][]		= array('application/zip', '504B03041400', '1', '0', '6', '0');
and replace with
$mime_type['zip'][0]	= array('application/zip', '504B03041400', '1', '0', '6', '0');
$mime_type['zip'][1]	= array('application/zip', '504B03040A00', '1', '0', '6', '0');
[/]
patriotfan
#4 2009-02-10 09:41
# Brock : Are you trying files that are allowed in the extension types?
Yes, zips are allowed

@drvan: I did that, but I still get the error message. Also, here is a screenshot of my code
My Cotonti powered site - [url=http://www.gnextop.patriotfan.co.cc]GnextopCenter[/url]
dervan
#5 2009-02-10 09:52
patriotfan, please show the first 6 bytes of zip file (in hex)
patriotfan
#6 2009-02-10 10:08
# dervan : patriotfan, please show the first 6 bytes of zip file (in hex)
I do not understand what you want me to do, but...
The fisrt 6 bytes of it are 203581 and converted to hex is ?? (i dont know about that)
My Cotonti powered site - [url=http://www.gnextop.patriotfan.co.cc]GnextopCenter[/url]
dervan
#7 2009-02-10 11:05
you can view zip file in any hex editor, for example in HxD - freeware Hex Editor for Windows

install HxD (or extract portable version), drag-and-drop zip file to HxD window, and you can see in HxD window the first 6 bytes in hex, like this: 50 4B 03 04 0A 00
Kilandor
#8 2009-02-10 14:26
Or upload the file to your FTP and then link it to us, or PM it to me.

Also what program was the zip created with, I compared many files for each type from different sources, when I made the mimetype list. Then, I can test and create multiple files with it to confirm a pattern, and we can likely add it to the list then.

Also this feature can be bypassed and turned off through Admin > Config > Personal File Space Though it is not recomended, as there are some possible security risks for allowing un-filtered uploads.

This post was edited by Kilandor (2009-02-10 14:47, 9 years ago)
dervan
#9 2009-02-10 18:07
Kilandor, i use 7-Zip or Info-ZIP (zip -r out.zip *) to create zip which contains subdirectories, and stably get signature 50 4B 03 04 0A 00

for example, you can download AkelPad-4.1.5-bin-eng.zip from this page, and you will see signature 50 4B 03 04 0A 00
Kilandor
#10 2009-02-10 18:51
Sorry my message was more directed to patriotfan.

But thanks for the info, i see what your referring too, I'll add that check to the core.

But it appears to not have fixed it for patriotfan, so a copy of his file would still be usefull.
Antar
#11 2009-02-11 00:51
Kilandor
#12 2009-02-11 03:06
Ok, i've added this new zip format to our config here, and added it to the SVN
patriotfan
#13 2009-02-12 06:41
# Kilandor : Sorry my message was more directed to patriotfan.

But thanks for the info, i see what your referring too, I'll add that check to the core.

But it appears to not have fixed it for patriotfan, so a copy of his file would still be usefull.
The file is here: http://philterprojects.com/downloads/gnextop_theme.zip
@dervan: 50 4B 03 04 0A 00 and here is the screenshot of it
My Cotonti powered site - [url=http://www.gnextop.patriotfan.co.cc]GnextopCenter[/url]

This post was edited by patriotfan (2009-02-12 06:49, 9 years ago)
dervan
#14 2009-02-12 08:12
patriotfan, yes it's the same signature

your system/mimetype.php is corrected now, and i don't understand why you can't download zip

please do this again:
1) extract original file system/mimetype.php from Cotonti disiributive
2) search in this file for string
$mime_type['zip'][]		= array('application/zip', '504B03041400', '1', '0', '6', '0');
and replace with
$mime_type['zip'][0]	= array('application/zip', '504B03041400', '1', '0', '6', '0');
$mime_type['zip'][1]	= array('application/zip', '504B03040A00', '1', '0', '6', '0');
3) upload this corrected file to host (overwrite old system/mimetype.php)
4) try again to upload with PFS your problem's zip[/]
patriotfan
#15 2009-02-12 09:28
I did what you said (I reuploaded the mimetype file and edited it) and I still get the error:

My Cotonti powered site - [url=http://www.gnextop.patriotfan.co.cc]GnextopCenter[/url]

12>>>