Re: SquirrelMail Attachments are all viewed in the browser as Text (MIME)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't top-post, thanks.

> > > Still no luck...
> > >
> > > I have now set error_reporting to E_ALL and also set display_errors to
> ON,
> > > and after another attempt at the attachment, there were no errors shown
> in
> > > the script output and it still displayed the same text.  I then created
> 3
> > > test pages and pasted the scripts above, and the HTML and Image both
> > > displayed correctly, and the text/UTF8 script prompted me to download
> the
> > > php file on the server, but displayed the HTML tags on my client (was
> that
> > > the expected behavior?).
> > >
> >
> > Remember that you should restart web service after changing php.ini and
> you
> > should test your php settings
> > (http://www.squirrelmail.org/wiki/TestPHPSettings) in
> order to make sure
> > that you have changed the right php.ini  file.
> >
> > html test should display
> > ---
> > You should see red text Test
> > ---
> > with Test written in red
> >
> > text test should display
> > ---
> > You should see html tags
> > Test
> > ---
> > I am not sure how nabble.com handles html tags in second line, but they
> > should look like html tags and not as red "Test"
> >
> > image test should display image file.
> >
> >
> >
> >
> > > I then created a 4th script as follows:
> > >
> > > -- PHP HEADER OMITTED --
> > > header('Content-Type: application/pdf');
> > > readfile('./images/license.pdf');
> > >
> > > The above script behaved properly, and allowed me to download the PDF of
> > > the
> > > server (which does not have reader) and also allowed me to view the PDF
> in
> > > the browser of the client (which does have reader)...
> > >
> > > Is it relevant that the UTF8 test script would only download on the
> server
> > > but display properly on the client?
> > >
> >
> > Not relevant, if browser on server can't handle text/plain files. Although
> > it looks strange. Browsers that can read html, usually can read plain text
> > too.
> >
> > It is not utf-8 test. Script tests text/plain content type. charset
> argument
> > is optional.
> >
> >
> >
> >
> > > Could there be an encoding or more so a
> > > decoding issue on the server that would not be an issue for e-mail
> clients
> > > that do their own decoding?
> > >
> >
> > Nope. SquirrelMail scripts do same thing as those test scripts, only with
> > more headers and more complex code. If other scripts can load text, html,
> > images and binary files correctly, then it is something in SquirrelMail
> > scripts.
> >
> > Could you create screenshot of browser window with broken download (top of
> > corrupted PDF attachment download) or right click on download link and
> > select save as? Then compare original attachment and downloaded file. Look
> > for extra lines on top of file.
> >
> > Or install firefox live http headers extension and log data that send and
> > received when attachment is downloaded. Logs should allow to detect, if
> IIS
> > changes or breaks headers submitted by SquirrelMail.
> >
> > One more script to - test http://pastebin.ca/939982.
> > This one sends license.pdf file as SquirrelMail does.
>
> Problem Solved!  Once I turned on the Error Reporting properly (Thanks for
> the tip)

This is in the mailing list posting guidelines.  You REALLY should
have read them carefully and it would have avoided lots of trouble and
time for everyone involved.

> I was able to see that the custom theme that I had used was (as you
> suspected) writing headers prior to the SM attachment generation.  I'm still
> not sure how, as the custom theme and default theme look identical with the
> exception of the color settings, but changing back to the default theme
> fixed the issue.  I just copied the colors to the actual default-theme.php
> page and now have the best of both worlds...  Thanks again for all of your
> advice!

It is likely that you have some blank space after the closing ?> at
the end of the file, even if just a carriage return.  Editing files in
Windows can oft lead to this even if you don't add it yourself.
Completely remove the ?> at the bottom of the file and this problem
might go away.  Also make sure the very first characters at the
beginning of the file are <?php

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux