View Issue Details

IDProjectCategoryView StatusLast Update
0017560phpList 3 applicationInstallationpublic21-06-18 13:00
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionopen 
Product Version3.0.10 
Target VersionFixed in Version 
Summary0017560: Is mb_string required to run phplist?
DescriptionThere have been a couple of problem reports on the user forum about phplist pages not displaying correctly. The solution appears to have been to enable mb_string. See https://forums.phplist.com/viewtopic.php?f=34&t=41608

This pull request from earlier this year https://github.com/michield/phplist/pull/27 unconditionally calls mb_strtolower().

If mb_string is now required then perhaps there should be a check for it being installed during initialisation, in addition to including that on the requirements page https://www.phplist.com/system_requirements
Tagsdocumentation

Activities

michiel

17-12-14 12:02

manager   ~0055771

Ah, interesting. I thought mb_string was part of PHP by default, according to the docs. Clearly not.

I actually had come across this problem and sorted it like this:

https://github.com/michield/phplist/blob/master/public_html/lists/admin/index.php#L628

I guess that hasn't gone into a new release yet. But yes, mb_string is needed.

michiel

18-12-14 18:30

manager   ~0055782

foudn an interesting method to check dependencies in the code:

http://www.glenscott.co.uk/blog/finding-function-dependencies-in-your-php-applications/

michiel

18-12-14 18:35

manager   ~0055783

it doesn't do recursive, but I get

Found 1450 function calls and 761 object instantiations in your script.
Function mailqueue_throttle not defined.
Function domain_batch_period not defined.
Function adonewconnection not defined.
Function attributevalueselect not defined.
Function mysqli_result not defined.
Function resizeimagefile not defined.
Function getleaftemplate not defined.
Function htmlemail not defined.
Function normalizeurl not defined.
Function invalidargumentexception not defined.
Function badmethodcallexception not defined.
Function domxpath not defined.
Function null not defined.
Function isnormalized not defined.

michiel

18-12-14 20:57

manager   ~0055784

Running https://github.com/michield/php-dependencies

finds the requirement of the following PHP extensions:

standard pcre imap Core date hash SPL filter openssl mbstring session curl xml iconv json gettext SimpleXML mysqli mysql libxml ctype fileinfo gd ftp

duncanc

25-03-15 12:48

updater   ~0055984

At the end of index.php there is some processing testing whether mb_strtolower() exists and if not then defining it to be strtolower().

The code is in the wrong place because mb_strtolower() is called in parseCline().
Because the new definition is within an if statement, the new function is not created until that statement is executed, which is after parseCline() has been called.

Need to position the code at the top of the file instead.

michiel

26-03-15 11:42

manager   ~0055986

yes, it can't even go in any of the library files, because the parseCline is called before including those.

michiel

26-03-15 11:43

manager   ~0055987

https://github.com/phpList/phplist3/commit/27637cf49e274ca46320411e63a5484e98ff22a8

leaving the issue open until the complete dependency list has been resolved and published somewhere.

michiel

26-03-15 21:41

manager   ~0055990

https://resources.phplist.com/system/start#system_requirements