php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5559 Unexpected Characters in Long Strings
Submitted: 2000-07-13 15:10 UTC Modified: 2000-08-31 13:50 UTC
From: rkenny at mke dot catalystwms dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 OS: Linux 2.2.14
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rkenny at mke dot catalystwms dot com
New email:
PHP Version: OS:

 

 [2000-07-13 15:10 UTC] rkenny at mke dot catalystwms dot com
Checked on the mailing lists before I came here and noticed that one or two other people having the same problem.  Seems that if you stuff a decent amount of text into a variable, and then use that variable to send an email using the "mail" function, you can get some unexpected characters in the resultant email.

I send two emails.  One email is a text message, is 3KB in size, and does not contain any errors that I can see.  The other email is in HTML format, is 6KB in size, and contains exclamation points and carriage retrurns scattered around after about halfway through the email.  The carriage returns are pretty harmless as browsers will ignore them when processing the HTML, but the exclamation points are screwing up my code and causing problems.

I suspect that this is related to the size limitations on strings, but when I searched through your documentation on how to typecast the string to something larger, I was not able to find any such animal.  Please advise.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-04 12:15 UTC] stas@php.net
reclassify
Also, it would be very helpful if you provide some details, like on what mails what characters are you getting. 
 [2000-08-11 00:22 UTC] rkenny at mke dot catalystwms dot com
OK, I've reclassified the bug under "other".  I'll attach some examples of what I'm talking about below.  Note that the string I used to send the email did not contain these exclamation points or carriage returns:

...contingency issues, and a strategic master plan for your warehouse.</p!
>...

...Catalyst International (CLYS) leads the warehouse management systems (WMS) industry in developing and!
 delivering cutting-edge ....

I just noticed that in both of the lines that had errors I did not have any carriage returns, and the errors occured at the 994th character in the line.  I hope this helps.
 [2000-08-31 13:50 UTC] sniper@php.net
This is a 'bug' or feature of sendmail. Not a bug in php.
Add those carriage returns into those strings.
e.g str_replace("<BR>","<BR>\n") 

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC