Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Forum Attachment Mod
Author Message
Soloknight
New Member
New Member


Joined: Apr 18, 2006
Posts: 8
Location: us

PostPosted: Mon Apr 21, 2008 12:18 pm Reply with quote

Ok addon is install correctly but when you download a zip file, windows zip feature says it's corrupted or invalid but I can unzip it with winrar if I download it straight from the folder it opens it correctly is there a setting I need to change for internet explorer and Firefox? Seem to be a problem with all accounts on website. It uploads correctly but you just can't open it when you download it with the nomal win zip feature.
 
View user's profile Send private message Visit poster's website
samgunner
New Member
New Member


Joined: Jan 31, 2008
Posts: 3

PostPosted: Mon Apr 21, 2008 1:43 pm Reply with quote

I do not believe the downloads here are corrupt. Which files did you download? I have downloaded both the 7zip and the targz files and have them running just fine on my WAMP server and a Test site running on my web server. Try reading the message in blue under the message in red on the main download page of this website and see if this is what is causing your problem.

If that is not the problem someone much more knowledgeable than me will be along soon. These guy's are quick to help around here! Smile
 
View user's profile Send private message
jestrella
Moderator


Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic

PostPosted: Mon Apr 21, 2008 1:50 pm Reply with quote

I personally do not recommend using the embedded windows zip functionality (and anything microsoft's.... but that's not the point). There are better tools out there to handle zip files including the famous WinZip, WinRar and 7-zip.

And btw i don't think that the default zip functionality under windows is capable of opening all versions of zip format, just below version 7 i think.

_________________
"For those whom have not reach the sky... Every mountain seems high"

Best Regards
Jonathan Estrella Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Soloknight
PostPosted: Mon Apr 21, 2008 3:09 pm Reply with quote

Well I'm talking about the addon on my website. The users are having problems opening the attachments from the forums addon from the website I figure that some how the web script does some kind of changes on the download causing window zip to think it's corrupted. If will download correctly if you preview it before you post it. But as soon as you download it after posted, you try to open it it says it corrupted.
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Mon Apr 21, 2008 4:00 pm Reply with quote

No changes that I'm aware of. Have you tried one of the other zip programs mentioned above?
 
View user's profile Send private message
Soloknight
PostPosted: Mon Apr 21, 2008 4:11 pm Reply with quote

I have a modified theme and use the default forums from raven nuke when I preview the attachment and download it and open it it works fine. but when I post it and download it (it doen't works) so there must be something in the code that change the download or download info from preview to posting. I tried over writing all files but it a no go. and yes I have tried other opening and they work fine. just don't want to required everyone on my site to have a zip opener to open zip files

the website is Only registered users can see links on this board! Get registered or login!
 
Raven
PostPosted: Mon Apr 21, 2008 4:44 pm Reply with quote

If the other zip openers are working then that's a failure on the part of windoze. This is a Microsoft issue, not an application issue. I know that sounds hard-nose but it is a fact nonetheless. Are you using Vista by any chance?
 
Soloknight
PostPosted: Mon Apr 21, 2008 5:59 pm Reply with quote

See the only problem is if I download any other zip from other website it opens it. Now if I upload that same file. then download it. (It should be the same file right?) it won't open it anymore say its corrupted or invalid that what so strange about it
 
Raven
PostPosted: Mon Apr 21, 2008 11:44 pm Reply with quote

I repeat - Are you using Vista?
 
Soloknight
PostPosted: Tue Apr 22, 2008 11:15 am Reply with quote

Sorry about that but I have 2 computers, one running vista and the other XP pro and I have tested it on both and they both have the same problem
 
gotcha
Regular
Regular


Joined: Mar 14, 2005
Posts: 91

PostPosted: Tue Apr 22, 2008 2:18 pm Reply with quote

I have found similar problems with my shop. Basically, not all text editors are created equal and some will even add extra newlines to the end of your php files. Well that whitespace can end up corrupting zip files. Some zip programs can handle those newlines and other just crap out. A way to verify this is to open the zip as a text file and if you see any blank lines before all the gibberish starts then you've found the problem. Now the solution(maybe, if this is in fact the problem)...
There should be a file that handles the output of uploaded files. In that file right before any output starts, you can put...

Code:
ob_end_clean();


That will get rid of all the newlines/whitespace and might even solve the corruption problem.
Edit: The other option would be to get a good text editor and remove the blank lines by hand.
Also, please excuse me if I'm way off base because I've never even looked at the attachment mod's inner workings Smile.
 
View user's profile Send private message Visit poster's website
Soloknight
PostPosted: Tue Apr 22, 2008 3:32 pm Reply with quote

Well That it. (I edited the zip file with notpad ++) and took out the lines, now I need to know where to put that line at. Thank you for your help.
 
gotcha
PostPosted: Tue Apr 22, 2008 7:45 pm Reply with quote

Try this out. Open up the file modules/Forums/download.php

Find
Code:


// Now the tricky part... let's dance
//   @ob_end_clean();


Change to
Code:


// Now the tricky part... let's dance
   @ob_end_clean();


All I did was uncomment code that was actually already there. Looks like it shouldn't have gotten commented out in the first place but I'm sure there is a good reason for it.

Please let us know how this works in case others run into the same problem.
 
Soloknight
PostPosted: Thu Apr 24, 2008 8:13 am Reply with quote

Sorry for the late response but that fixed it. Thank you for your help
 
Raven
PostPosted: Thu Apr 24, 2008 12:34 pm Reply with quote

We are creating an internal Only registered users can see links on this board! Get registered or login! issue on this. We'll try to sort this out as you are the first and only person that I'm aware of that has this issue. Can you supply the following information to assist us in trying to replicate the issue?

Host Server Operating System AND version (linux, windows, ubuntu, etc.):
Web Server AND version (Apache, IIS, etc.):
Database Server AND version (MySQL, SQL Server, etc.):
PHP version (Apache module or CGI):
Any other environmental settings/software that might be pertinent.

If you are uncomfortable with posting this info then please send it via PM to me.

Thanks!
 
gotcha
PostPosted: Thu Apr 24, 2008 2:50 pm Reply with quote

Raven, I think it can be replicated on pretty much any setup by just adding some blank lines to files that get called on every page load, mainfile.php, config.php, etc. I think the main reason it happens is people editing the config and rnconfig with notepad or wordpad. If you add it to mantis go ahead and assign it to me if you'd like Smile
 
Raven
PostPosted: Thu Apr 24, 2008 11:15 pm Reply with quote

So, in essence, we are putting a bandaid solution to a problem that is almost certainly a result of using crummy notepad as an editor :grrr: I actually believe we should not do anything because the problem is not with the application. It's with the user and/or the editor being used. So, we can make this a sticky and/or add a note to the FAQ but I am not in favor of changing anything in our code.
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Apr 25, 2008 2:03 am Reply with quote

I agree with Raven. I cannot duplicate the issue except where gotcha said. Smile

ob_end_clean may have been commented out in the original mod, so they may have a reason for that I cannot figure out at the moment.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9455
Location: Arizona

PostPosted: Fri Apr 25, 2008 12:02 pm Reply with quote

Yeah, and we make it pretty clear in our instructions as to which editors to avoid using....

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Soloknight
PostPosted: Wed Apr 30, 2008 8:40 pm Reply with quote

Sry for the late response again but I use Dreaweaver and notepad ++ I will PM you raven with info on server
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Forum Attachment Mod

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©