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

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

 




Matthew Ortner (personal) wrote:
> 
> 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.
-- 
View this message in context: http://www.nabble.com/SquirrelMail-Attachments-are-all-viewed-in-the-browser-as-Text-%28MIME%29-tp15961517p16011475.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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