Send a Message Page Gets Cut Off [solved]

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

Send a Message Page Gets Cut Off [solved]

Postby scottm » 8:18am, Sun 25 Apr, 2010

Just installed PHPList and set everything up, but when I go to the Send page, it gets cut off.

Screen shot 2010-04-25 at 1.10.32 AM.png
Screen shot 2010-04-25 at 1.10.32 AM.png (95.59 KiB) Viewed 24901 times


Looks like the HTML code stops writing after this line: "<form method=post enctype="multipart/form-data" name="sendmessageform"><input type=hidden name="workaround_fck_bug" value="1">"

Any suggestions?

Thanks in advance.
scottm
phpLister
 
Posts: 5
Joined: 8:12am, Sun 25 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby eazeegeek » 9:21am, Sun 25 Apr, 2010

Try checking the error-logs.
You should be able to identify where the fatal error is happenings.
If you post the error message here, then someone might be able to help you.
When using the Forum
  • Give details of your issue with error messages
  • Tell everything you have tried
  • For resolved issues add "RESOLVED" to Subject of your Post
eazeegeek
PL Master
 
Posts: 343
Joined: 3:42pm, Tue 02 Mar, 2010
Location: Bangalore, India

Re: Send a Message Page Gets Cut Off

Postby scottm » 9:49pm, Sun 25 Apr, 2010

Nothing shows in the error logs related to this. Unless there is an error-log within PHP list that I am missing.

Thanks
scottm
phpLister
 
Posts: 5
Joined: 8:12am, Sun 25 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby eazeegeek » 12:03am, Mon 26 Apr, 2010

These are the things that you can try.

1. disable FCK Editor and check whether the simple textarea for typing your content is visible.
2. the issue seems to be in how send_core.php file is rendering the page. So create a backup of this file and replace it with a fresh copy from your version's installation folder.
3. recheck the error logs to see whether anything about send_core.php is mentioned. I am not sure whether the Apache error logs will be saved in the root folder of your domain or in the admin folder in PHPlist.

More information on the customizations that you have made might help?
When using the Forum
  • Give details of your issue with error messages
  • Tell everything you have tried
  • For resolved issues add "RESOLVED" to Subject of your Post
eazeegeek
PL Master
 
Posts: 343
Joined: 3:42pm, Tue 02 Mar, 2010
Location: Bangalore, India

Re: Send a Message Page Gets Cut Off

Postby scottm » 7:13pm, Mon 26 Apr, 2010

Thanks.

Disabling the FCK Editor was the first thing I tried before starting this thread. I tried uploading a fresh send_core.php, but still have the same issue with no error log.

I haven't done any customizations, other than what's available in the /admin. I installed via Fantastico on my shared hosting providers cPanel...v2.10.10. I had the same problems so I upgraded to v2.10.12, but no luck.
scottm
phpLister
 
Posts: 5
Joined: 8:12am, Sun 25 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby bpbeinlich » 8:00pm, Mon 26 Apr, 2010

Funny, I am in exactly the same situation. I just installed 2.0.12 and am having the exact same problem. I've disabled FCK_editor, too.

Update: nothing in the PHP error logs for me, either.
bpbeinlich
phpList newbie
 
Posts: 4
Joined: 7:20pm, Mon 26 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby eazeegeek » 8:21pm, Mon 26 Apr, 2010

Alright, this is getting out of my league.
So here is what I would have done if it happened to me.

1. Open the Send Message page in ALL browsers that I have (to be sure that it is not browser-specific)

2. Open the page on another system (to eliminate a specific computer issue)

3. Create a new SuperUser account with ALL rights in PHPlist and try opening the Send Message page after logging in from that account. Obviously, I would restart the computer and clear browser cache before opening the page!

4. Finally, since I also have installed my PHPlist from Fantastico in cPanel, I would do a manual install in a new folder (retaining the existing one as it is). Transfer one customized file from the existing setup to the new one, testing the Send Message page with each transfer and repeating until the issue was either replicated or fixed! I understand that this is time-consuming, but might make it work.
When using the Forum
  • Give details of your issue with error messages
  • Tell everything you have tried
  • For resolved issues add "RESOLVED" to Subject of your Post
eazeegeek
PL Master
 
Posts: 343
Joined: 3:42pm, Tue 02 Mar, 2010
Location: Bangalore, India

Re: Send a Message Page Gets Cut Off

Postby bpbeinlich » 9:08pm, Mon 26 Apr, 2010

1. I tried the page in FF(which I use), IE, Chrome, and Safari. Same results everywhere.
2. I tried the page on my wife's (Apple phone whose name starts with an i -- the forum calls it SPAM) (I don't really have another machine available). Same results.
3. I created a new superuser. Same results.
4. I don't know about doing another install. I have not changed the code at all, other than to change the email field length from 255 to 233 as mentioned here:

http://mantis.phplist.com/view.php?id=8583

I'm pretty sure I did this correctly, as I have added users with no problems.

I think I'll start looking at the code. It's pretty clear that something is making the page exit prematurely (or else there is a CSS issue).

Suggestions welcomed!
bpbeinlich
phpList newbie
 
Posts: 4
Joined: 7:20pm, Mon 26 Apr, 2010

Re: Send a Message Page Gets Cut Off <SOLVED>

Postby bpbeinlich » 9:52pm, Mon 26 Apr, 2010

OK, here's the culprit:

This block of code appears in send_core.php beginning at line 1032:

$utf8_subject = $subject;
$utf8_from = $from;
if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
$utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
$utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);
}

The first call to iconv crashes the page. I looked deeper and discovered that these variables ($utf8_subject and $utf_from) are not used anywhere. So this code is apparently not used at all. I commented out the entire block of 6 lines and the page now displays correctly.

Brian
bpbeinlich
phpList newbie
 
Posts: 4
Joined: 7:20pm, Mon 26 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby scottm » 10:41pm, Mon 26 Apr, 2010

Sweet. Thanks bpbeinlich. That solved it.
scottm
phpLister
 
Posts: 5
Joined: 8:12am, Sun 25 Apr, 2010

Re: Send a Message Page Gets Cut Off

Postby eazeegeek » 11:35pm, Mon 26 Apr, 2010

Great. It is a learning experience for me too!
Thank you.

Please add [RESOLVED] to the post header so that others can refer it if they face the same issue.
When using the Forum
  • Give details of your issue with error messages
  • Tell everything you have tried
  • For resolved issues add "RESOLVED" to Subject of your Post
eazeegeek
PL Master
 
Posts: 343
Joined: 3:42pm, Tue 02 Mar, 2010
Location: Bangalore, India

Re: Send a Message Page Gets Cut Off <SOLVED>

Postby H2B2 » 3:15am, Tue 27 Apr, 2010

bpbeinlich wrote:OK, here's the culprit:

This block of code appears in send_core.php beginning at line 1032:

$utf8_subject = $subject;
$utf8_from = $from;
if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
$utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
$utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);
}

Nice find. Would be useful if you could provide some configuration and server details that could help developers replicate the problem. Once they can reproduce this issue on their system, they should be able to address it and fix it.

I have tried in vain to reproduce the issue by changing charset related configuration options in phpList: everything keeps working fine.

My system details (lists/admin/?page=community) :
* phplist version: 2.10.12
* PHP version: 5.2.3
* Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
* Webserver: Apache/1.3.37 (Unix) PHP/5.2.3 mod_ssl/2.8.28 OpenSSL/0.9.8a mod_perl/1.29 FrontPage/5.0.2.2510
* Mysql Info: 4.1.12-standard-log
* PHP Modules: libxml, xsl, xmlwriter, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, PDO, sockets, SQLite, standard, Reflection, posix, pdo_sqlite, pdo_mysql, mysql, mhash, mcrypt, mbstring, json, imap, iconv, hash, gettext, gd, ftp, filter, exif, date, curl, ctype, calendar, bcmath, zlib, openssl, apache, Zend Optimizer
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: Send a Message Page Gets Cut Off [solved]

Postby bpbeinlich » 9:22pm, Tue 27 Apr, 2010

OK, here are my system details:

* phplist version: 2.10.12
* PHP version: 4.4.9
* Browser: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
* Webserver: Apache
* Mysql Info: 4.1.22-max-log
* PHP Modules:
o zip
o xml
o tokenizer
o sybase
o standard
o session
o overload
o mysql
o mcrypt
o gettext
o gd
o ftp
o domxml
o curl
o ctype
o calendar
o bcmath
o zlib
o pcre
o openssl
o Zend Optimizer

I notice that iconv is not in the module list, as it is in your example. The problem is probably related to being run with php 4.x, since iconv is included on php5. My site is hosted on GoDaddy, and I find that I don't have much control over adding extensions. Funny that a missing extension would crash the page with no entry in the error log.

What is more interesting to me is why the code is even in the page. The two variables that are being worked with aren't used anywhere else on the page. So it seems like the block doesn't even need to be there.

One other thing: I don't know how to change the post header... does scottm need to do it?

Let me know if you need anything else.

Cheers,
BB
bpbeinlich
phpList newbie
 
Posts: 4
Joined: 7:20pm, Mon 26 Apr, 2010

Re: Send a Message Page Gets Cut Off [solved]

Postby scottm » 9:48pm, Tue 27 Apr, 2010

Here's mine. Hope it helps.

phplist version: 2.10.12
PHP version: 4.4.9
Browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7
Webserver: Apache/1.3.41 (Unix) mod_fastcgi/2.4.6 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
Website: xxxxxx
Mysql Info: 5.0.90-community
PHP Modules:
zip
xml
tokenizer
swf
standard
sockets
session
pspell
posix
pgsql
overload
mysql
mhash
mcrypt
mbstring
imap
gettext
gd
ftp
exif
curl
ctype
calendar
bcmath
zlib
pcre
openssl
ionCube Loader
Zend Optimizer
scottm
phpLister
 
Posts: 5
Joined: 8:12am, Sun 25 Apr, 2010

Re: Send a Message Page Gets Cut Off [solved]

Postby H2B2 » 2:44am, Wed 28 Apr, 2010

Thank you both for your system details, which indeed seem to confirm that the iconv module needs to be included in the PHP installation.
Filed this bug report: http://mantis.phplist.com/view.php?id=15463

bpbeinlich wrote:What is more interesting to me is why the code is even in the page. The two variables that are being worked with aren't used anywhere else on the page. So it seems like the block doesn't even need to be there.

Well, iconv() appears to have been introduced in v2.10.10 to fix an encoding issue in the Subject and From fields (see note 50601 in this issue report).
Leaving aside whether or not that was the best solution, it seems important that, when used, the call to iconv should have a fall back method (or fail gracefully) if the module isn't detected. Your findings appear to underline this conclusion.

bpbeinlich wrote:One other thing: I don't know how to change the post header...

I suppose you are referring to the charset header line. I haven't had the time to look at all the v2.10.12 changes related to charset encoding. With regard to the admin interface pages, the relevant header line is 'echoed' in admin/pagetop.php : you'll see that
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $strCharSet?>" />
uses the strCharSet variable, which currently (v2.10.12) appears to be defined in admin/languages.php, which in turn uses the value set in the language_info files that are located in the admin/lan/ subdirectories. In short, the charset value for the admin interface pages will depend on the admin language you have selected.

I haven't checked this yet for v2.10.12, but it is possible that $GLOBALS['strCharSet'] refers to the strCharSet setting of the of language file defined in config.php, as it was in previous versions.

See also related discussion in http://mantis.phplist.com/view.php?id=1644
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Next

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests