Reputation: 133
I recently moved to an unmanaged VPS and added a Joomla component to a client website and received the following error when attempting to use a specific part of the component.
Fatal error: Call to undefined function mb_strtolower() in /home/oursite/public_html/components/com_rsfiles/helpers/files.php on line 135
I'm sure if this was on a shared machine the error would not have been thrown because they would have configured the server to accept it. But that is not my case. I have to configure it to work.
The original error lead me to identify if mbstring was enabled on our server and it was not.
So I wondered how I could enable it. Googled it! found it may be a derivative of the php.ini file so I tried to enable it using this php.ini definition. zend.multibyte = 1. After adding the line I restarted the Apache web server but the php info page still showed it disabled. :-(
After making the above modification I received a different error when attemoting to access the same page throwing the original error. This is the new error:
Fatal error: Could not convert the script from the detected encoding "UTF-8" to a compatible encoding in /home/psgadmincore/public_html/libraries/legacy/controller/legacy.php on line 609
There are 8 other mbstring items in the php.ini file but they are all commented out.
;mbstring.language = Japanese
;mbstring.internal_encoding = EUC-JP
;mbstring.http_input = auto
;mbstring.http.output = SJIS
;mbstring.encoding_translation = On
;mbstring.detect_order = auto
;mbstring.substitute_character = none
;mbstring.func_overload = 0
I un-commented all of these thinking they had to be enabled also, but the "Could not convert the script" error is returned.
Can someone please direct me to a procedure that outlines the steps necessary to include the "Multibyte String library"?
CENTOS 6.7 x86_64 virtuozzo w/Cpanel - php 5.4.33
These sites have not help me: http://php.net/manual/en/ref.mbstring.php http://php.net/manual/en/ini.core.php#ini.zend.multibyte
Thank you
Upvotes: 2
Views: 6153
Reputation: 133
After @ceejayoz response I though I would upgrade the php build to 5.6. I used EasyApache in the WHM to carry out the process below. During the upgrade I was able to select mbstring module in the Exhaustive Options List.
Upvotes: 1