Zip file corruption [message #25335] |
Tue, 07 June 2005 03:05 |
cstdenis
Messages: 17 Registered: April 2005
Karma: 0
|
Junior Member |
|
|
Zip file downloads are getting corrupted.
Additional data is being added before the normal header.
Origional header:
PK
セ2 Air/PK 尅2Y・ヨ 瑟
Header from downloading from fudform
・ "€ンPK
セ2 Air/PK 尅2Y・ヨ 瑟
for some reason "・ "€ン"is being pre-pended.
this extra data does not appear to exist on the file stored on the server.
apache2 php5 FUDforum 2.6.12.
|
|
|
|
|
|
Re: Zip file corruption [message #25581 is a reply to message #25578] |
Tue, 14 June 2005 13:17 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, you are using a non-standard forum SQL schema, you can't honestly expect the stock upgrade script to be aware of that...
More over, views are database specific feature that MySQL does not support for example, so no...
FUDforum Core Developer
|
|
|
Re: Zip file corruption [message #25584 is a reply to message #25335] |
Tue, 14 June 2005 17:07 |
cstdenis
Messages: 17 Registered: April 2005
Karma: 0
|
Junior Member |
|
|
Quote: | views are database specific feature that MySQL does not support.
|
I don't see what MySQL's limited SQL support has to do with this. Anyway, mysql 5 supports views.
All it requires is to change the else statement here
if (__dbtype__ == 'mysql') {
$c = q("show tables LIKE '".str_replace('_', '\\_', $GLOBALS['DBHOST_TBL_PREFIX'])."%'");
} else {
$c = q("SELECT relname FROM pg_class WHERE relkind='r' AND relname LIKE '".str_replace('_', '\\\\_', $GLOBALS['DBHOST_TBL_PREFIX'])."%'");
}
to
$c = q("SELECT relname FROM pg_class WHERE (relkind='r' or relkind='v') AND relname LIKE '".str_replace('_', '\\\\_', $GLOBALS['DBHOST_TBL_PREFIX'])."%'");
on line 291 of the upgrade script.
Quote: | Well, you are using a non-standard forum SQL schema, you can't honestly expect the stock upgrade script to be aware of that...
|
Well, I kind of expected the "Have you manually modified FUDforum's SQL structure?" checkbox to do something.
Anyway, back on topic, any other ideas regarding the header garbage being added to downloads from my forum?
Edit: this is what the extra header data looks like in hex:
1F 8B 08 00 00 00 00 00 00 03 00 2A 80 D5 7F
[Updated on: Tue, 14 June 2005 17:23] Report message to a moderator
|
|
|
Re: Zip file corruption [message #25589 is a reply to message #25584] |
Tue, 14 June 2005 20:41 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Ok I see the issue with views now, I've added a patch that should hopefuly resolve that problem.
As far as attachment data, check if the uploaded files have it @ the top, the getfile (download) just does a readfile() on the data so it does not modify the content in any way.
FUDforum Core Developer
|
|
|
|
Re: Zip file corruption [message #25605 is a reply to message #25604] |
Wed, 15 June 2005 02:42 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
On file downloads the forum sends 3 headers:
Content-Type:
Content-Disposition:
Content-Length:
FUDforum Core Developer
|
|
|
|
Re: Zip file corruption [message #25613 is a reply to message #25611] |
Wed, 15 June 2005 12:17 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Unless the content in plain text the getfile will add mime-header indicating that it is something else, that's what the Content-Type header sent by PHP does.
FUDforum Core Developer
|
|
|