Re: Attachment Mod 2.0.1 by Frank H

Hi everybody!
I'm new both in PunBB and in PHP, so... hope not to post a stupid question...
I've got a problem with MS-IE.

It's impossible to download attachments. The error is (translated):
Impossible to download attachment.php?item=5 from nnn.nnn.nnn.nnn.

It seems like IE doesn't understand to download a file...
With Firefox, on Linux or Windows, everything works fine.
Any idea?

Thanx to all!

477

Re: Attachment Mod 2.0.1 by Frank H

What version of IE are you using?
Is it PunBB saying that error, or IE dialog box?
What security settings have you set on firewall/IE connection settings?

Re: Attachment Mod 2.0.1 by Frank H

It happens with both IE 6 and 7.
It's an IE MsgBox.
It's like IE doesn't understand the header with the "filename" command.
When IE asks me to "Open" or "Save" the file (recognizing the Content-Disposition header, I think) the name it shows is "Attachment.php?item=5" (where Firefox shows the correct filename "Prova Allegati.txt"). Then, if I choose to open the file (it's a txt file), IE shows the text, but if I try to save it I got the error.

The connection is SSL secured.
The firewall is not a constant in this problem: it happens to me and to other friends of mine in different cities with different networks and different PCs...
With Firefox installed on Ubunto or WinXP, I see immediately that there are no problems: the filename showed is the correct one.

Anyway, the problem IMHHHO seems to be right in the filename header... IE never shows the correct one.

Thanx for reply and... sorry for my poor English. ^_^

479

Re: Attachment Mod 2.0.1 by Frank H

hmm ... the header jungle is an annoying thing to debug (often per server/client issues) big_smile

I looked through my mod and the mime if fetched from the database ... (As I remembered wink)

hmm ... could you try to replace lines 103 to 106 in attachment.php with

header('Content-Type = application/download');

(Just comment out the if statement, and try that row instead instead)

Re: Attachment Mod 2.0.1 by Frank H

Still doesn't work... sad
I've tried writing

$attach_mime = 'application/download';
if(strlen($attach_mime)!=0)  
                header('Content-Type: ' . $attach_mime );
        else
                header('Content-type: application/octet-stream');

(by-passing the if statement)
and also

header('Content-Type = application/download');
/* if(strlen($attach_mime)!=0)  
                header('Content-Type: ' . $attach_mime );
        else
                header('Content-type: application/octet-stream'); // a default 
*/

but nothing. Now IE doesn't show the Open/Save question dialog, it tries automatically to save the (not existing) file "attachment_php?item=5"...
I think IE understand the download command, but not what file to download...

481

Re: Attachment Mod 2.0.1 by Frank H

ah ... so it's the filename part that is messed up ... hmm...

perhaps easier to continue the error searching on mail ... I'm collecting some info and send a mail to you  smile

Re: Attachment Mod 2.0.1 by Frank H

Can help?
http://support.microsoft.com/?scid=kb%3 … 6&y=12
I think it could be something similar...

483

Re: Attachment Mod 2.0.1 by Frank H

After some mail conversation 19lolito82 might have found the headers causing the mess ... if it turns out to be true, I'll write a little howto, if someone else get this problem. smile

484

Re: Attachment Mod 2.0.1 by Frank H

I have just tried to install this mod but when I run AP_Attachment_Mod.php, I get an error message:

An error was encountered
Error: Unable to count number of attachment files.

Where have I gone wrong?

Re: Attachment Mod 2.0.1 by Frank H

mrnick wrote:

I have just tried to install this mod but when I run AP_Attachment_Mod.php, I get an error message:

An error was encountered
Error: Unable to count number of attachment files.

Where have I gone wrong?

Please enable debug mode and paste the full error.

Looking for a certain modification for your forum? Please take a look here before posting.

486 (edited by Lucas Malor 2007-10-01 11:07)

Re: Attachment Mod 2.0.1 by Frank H

Only two little problems:

- the post is submitted also if the attached file is not uploaded because not allowed, and no alert message is displayed

- if an attachment is deleted, remains a 0 byte file, also if orphans are deleted and tables are cleaned with the plugin tools

487 (edited by rexron 2007-10-02 14:13)

Re: Attachment Mod 2.0.1 by Frank H

Hello.
I read in another forum that someone has a problem with installing AP Attacmentd mod. So do I.
I get the same exact message. Unnable to copy .htaccess to new sub directory. I´ve set the chmod to 777 on that directory. But the new directory created by the installation changes back to 750 after trying to set it 777. The thing is that the attachment directory stays at 777.

I allso found out that my host has safe mode ON as a global setting and that it can´t be changed.
Does this mean that I can´t use this mod?


Anyone who can help me please?

RexRon

488

Re: Attachment Mod 2.0.1 by Frank H

Solved the problem by setting the chmod to 02777.

Re: Attachment Mod 2.0.1 by Frank H

I have a problem with attachment files with russian encodding names. It are downloading to forum, but users can't dowload it from forum. And russian encoding names are not correctly viewing. I have UTF-8 encoding. What it can be?

Re: Attachment Mod 2.0.1 by Frank H

Any word as to making this work without altering or adding additional code/files in 1.2.16?

Re: Attachment Mod 2.0.1 by Frank H

PhishShticks wrote:

Any word as to making this work without altering or adding additional code/files in 1.2.16?

It should probably work, as long as you modify install_mod.php as per the instructions on the sticky in this forum.

Looking for a certain modification for your forum? Please take a look here before posting.

492

Re: Attachment Mod 2.0.1 by Frank H

PhishShticks wrote:

Any word as to making this work without altering or adding additional code/files in 1.2.16?

http://cms.frankh.shacknet.nu/index.php … ;Itemid=32

Read the section about "Installing the mod on PunBB 1.2.6+", and of course the one above, and make sure to make backups before you start big_smile
(I'm running it on a 1.2.16 forum, but it's installed a long time ago, and I've just done the hdiff upgrades to that forum, but I still think it should work)

493

Re: Attachment Mod 2.0.1 by Frank H

AndyDeacon wrote:

I have a problem with attachment files with russian encodding names. It are downloading to forum, but users can't dowload it from forum. And russian encoding names are not correctly viewing. I have UTF-8 encoding. What it can be?

Hmm, no idea what the problem is, could be that the UTF-8 and php functions doesn't work together as they should (I might be using non-UTF-8 safe functions, I don't remember, sorry)

After new years eve I might have time to take a look at it ... (I'm unfortunately working alot at the moment, 10-14 hour days, so more or less only work, eat & sleep tongue)

494

Re: Attachment Mod 2.0.1 by Frank H

FYI

I have successfully installed the mod in a 1.2.17 installation.  I followed Frank's directions very carefully for 1.2.6+ installations, but made no changes of my own.  I'll report here if I find any problems, but it looks OK on initial testing.

495

Re: Attachment Mod 2.0.1 by Frank H

shadowpr18 wrote:

An error was encountered
File: C:\xampp\htdocs\install_mod.php
Line: 117

PunBB reported: Unable to copy .htaccess file to new subfolder with name 'C:/xampp/htdocs/attachments/280a2a7f06d93328eaad3885e5336a57'

I have this same problem. Now I cant delete the files in their either, I change permissions and it changes them back and tells me I cant delete the files.

496

Re: Attachment Mod 2.0.1 by Frank H

I have read in this forum other users who are using 1.2.14, but when I try to rund the install_mod.php, I get the message...

You are running a version of PunBB (1.2.14) that this mod does not support. This mod supports PunBB versions: 1.2, 1.2.1, 1.2.3, 1.2.4, 1.2.5

What is my next step?

497

Re: Attachment Mod 2.0.1 by Frank H

Try reading the sticky topics.

498

Re: Attachment Mod 2.0.1 by Frank H

Thanks MattF... When the message stated that "This mod supports...", I took it to mean the Attachment Mod I was attempting to install, and not the Mod Installer.

Anyway, you got me back on track and everything installed perfectly. This Attachments Mod is great!

499

Re: Attachment Mod 2.0.1 by Frank H

RAHster wrote:

Thanks MattF... When the message stated that "This mod supports...", I took it to mean the Attachment Mod I was attempting to install, and not the Mod Installer.

It's just when the mod creator decide to put version numbers in the installer. It is somewhat of a misleading, (and largely unnecessary), message.

500

Re: Attachment Mod 2.0.1 by Frank H

I seem to be having a somewhat unique issue as I have not been able to find anyone else with similar issues. I've installed attachments mod on my site. Everything seems to work as it should but when I attempt to download any of the files, they are all corrupt. By that I mean if it's a text file all I get is the page source data. If I download a zip or rar file, I get a message saying file is corrupt and images I get file format can't be read.
However, if I go to my attachments folder and rename the file to it's original format, I can then open the file and view it as I should. So what I am getting from this is that the file is uploaded and stored correctly but when I download it is where the issue lies.

Any help with this would be greatly appreciated.