CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 String length problem

Print topic Send  topic

Author Message
FERAD

Posts: 51
Posted: 08/27/2007, 4:01 PM

I am trying to copy long string values to a message variable. The problem is that the strings (for $msg1 and $msg2) seem to be truncated at about 1KB long. $Message will contain the truncated versions of $msg1 and $msg2. Any ideas would be greatly appreciated.

eg.
$message = $msg1 . $msg2 . ..."";
mail($to_email, $subject, $message, $headers);

Thanks in advance.
View profile  Send private message
klwillis


Posts: 428
Posted: 08/28/2007, 3:55 PM

How are you building the $msg1 and $msg2 strings?

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
FERAD

Posts: 51
Posted: 08/28/2007, 6:06 PM

$msg1 is built by using a database to create an array of email addresses then converted to a string.

$msg2 is just a TextArea->GetText() for a data field called details. This value is getting stored in the database as expected.

if($Result && $ShownMail < $Max_Mail)
{
do {
$the_mail[] = $db->f("email");
$ShownMail++;
$is_next_record = $db->next_record();
} while ($is_next_record && $ShownMail < $Max_Mail);
}

$msg1 = implode(", ", $the_mail);
//creates comma separated string

$message = "";
$message = $msg1 . "</b><br>". $events->TextArea1->GetText() . "<br><br>";


View profile  Send private message
datadoit.com
Posted: 08/28/2007, 6:14 PM

May be a memory size limit in PHP?

memory_size_limit=

in php.ini.
klwillis


Posts: 428
Posted: 08/28/2007, 6:25 PM

Try using a different set of logic - if memory settings weren't the issue.

Quote FERAD:
$msg1 is built by using a database to create an array of email addresses then converted to a string.

$msg2 is just a TextArea->GetText() for a data field called details. This value is getting stored in the database as expected.

if($Result && $ShownMail < $Max_Mail)
{
do {
$the_mail[] = $db->f("email");
$ShownMail++;
$is_next_record = $db->next_record();
} while ($is_next_record && $ShownMail < $Max_Mail);
}

$msg1 = implode(", ", $the_mail);
//creates comma separated string

$message = "";
$message = $msg1 . "</b><br>". $events->TextArea1->GetText() . "<br><br>";




_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
FERAD

Posts: 51
Posted: 08/28/2007, 6:28 PM

This is the default value set in php.ini. I am only trying to create a string of about 5-10KB Maximum.

memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

View profile  Send private message
Wkempees
Posted: 08/29/2007, 6:52 AM

Interesting problem.
a: The retreived text is 'binary'and contains an EOF character.
b: The stored text is not as you expect.
most likely
c:http://forums.codecharge.com/posts.php?post_id=80025&s_keyword=1024
you need to adjust the parameter as discussed in above article.

Found using "Search"in Forums top menu, searched for "1024"
as I knew had seen something like this. You mentioned 1000B where read,
which is somewhat like 1024, lol.

Hope this does it!

Walter
FERAD

Posts: 51
Posted: 09/07/2007, 1:27 PM

Checked the PHP.ini code and made all adjustments as suggested above. Still no change. Using PHP Version 5.2.3
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.