{"id":3390,"date":"2014-03-23T13:51:13","date_gmt":"2014-03-23T13:51:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/phpstringtruncationmbstringrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-23T13:51:13","modified_gmt":"2014-03-23T13:51:13","slug":"phpstringtruncationmbstringrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/phpstringtruncationmbstringrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"php,string,truncation,mbstringRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/52a428add5280451f587bc60def1bc6b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMohammad<br \/>\nphp netbeans character-encoding whitespace file-encodings<br \/>\nI&#8217;m editing the functions.php file of a WordPress theme and whenever I edit it, even when the edit is adding a single space the server returns error:Parse error: syntax error, unexpected &#8216;}&#8217; in \/theme\/functions.php on line 1 This is where I add the single space:&lt;?php load_theme_textdomain(&#8216;theme&#8217;, get_template_directory() . &#8216;\/languages&#8217;); &lt;- I added a single space hereand everything dies after that. This is not a consistent error, as it goes away after I replace the whole functions.p<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/yDGyG.jpg?s=32&amp;g=1\" \/><br \/>\nnetcoder<br \/>\nphp unit-testing sockets<br \/>\nGreetings Stackoverflowers,I have an application in which a communication abstraction layer exists. Each implementation in this layer, called a connector, provides my application with a way of exchanging data with a connected peer (e.g.: through HTTP, TCP sockets, UDP sockets, etc.).Per example, I have a Connector_Tcp class that implements methods such as read, write, open and close.I need to write a unit test for that class. I know that unit tests should have as less dependencies as possible. U<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ff683035d43186e6e0b68002edf16748?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTaffman<br \/>\nphp tags fgets<br \/>\nI&#8217;m using fgets to read a text file that contains field names delimited with the &#8220;&lt;&#8221; and &#8220;&gt;&#8221; characters. It seems like fgets is seeing these field names as tags and stripping them. I thought that only fgetss stripped tags and that fgets should allow this. I&#8217;m testing this with the following code:&lt;?php $handle = @fopen(&#8220;Test.txt&#8221;, &#8220;r&#8221;); if ($handle) {while (($buffer = fgets($handle, 4096)) !== false) {echo $buffer;}if (!feof($handle)) {echo &#8220;Error: unexpected fgets() fail\\n&#8221;;}fclose($handle<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/133978b437b712189938510d2072a137?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChris<br \/>\nphp<br \/>\nI&#8217;m not sure how simple is this to solve, but I assume I&#8217;m doing something wrong. I&#8217;m new to PHP, so bear with me, please.When I started learning PHP, I always placed all my project files into the same folder along with index.php and thus included everything like this:&lt;?php include(&#8216;.\/translation.php&#8217;); ?&gt;Later on in the process of learning as I gained experience and my skill increased, I had to start using folders and place my files into sub folders. I ended up successfully including my f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/eIOEk.jpg?s=32&amp;g=1\" \/><br \/>\nDarkCthulhu<br \/>\nphp string utf-8 comparison<br \/>\nI&#8217;m trying to compare two string lets say \u00c9milie and Zoey. Well &#8216;E&#8217; comes before &#8216;Z&#8217; but on the ASCII chart Z comes before \u00c9 so a normal if ( str1 &gt; str2 ) Won&#8217;t work. I tried with if (strcmp(str1,str2) &gt; 0) still don&#8217;t work. So i&#8217;m looking into a native way to compare string with UTF-8 characters.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/41869b3e0fbebc5e266376257b83b792?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmeder<br \/>\nphp javascript html validation dom<br \/>\nI&#8217;m looking for something like http:\/\/validator.nu\/, I&#8217;ll be validating html input ( string ) and I want to notify the user if there are any missing end tags, whether a certain element can&#8217;t have a certain attribute, things of that nature ( HTML 4.01 Strict validation basically ).Sidenote: I won&#8217;t be dealing with XML\/DTDs, and I don&#8217;t want to correct the user input like how http:\/\/htmlpurifier.org\/ does it.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/nZEUQ.png?s=32&amp;g=1\" \/><br \/>\nPeeHaa<br \/>\nphp<br \/>\nI have a bit of a general dissatisfaction about the way passing by reference works in PHP, coming from a Java background myself. This might have been talked about before on SO, so I&#8217;m sorry if this might seem redundant.I&#8217;m going to give a code example to make things clear. Say we have a Person class:&lt;?phpclass Person {private $name;public function __construct($name){$this-&gt;name = $name;}public function setName($name){$this-&gt;name = $name;}public function getName(){return $this-&gt;name;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/11817ba9c5a4be651816ec670809165a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1615069<br \/>\nphp logging<br \/>\nWell&#8230;I do know it&#8217;s good to log errors when the website is in production and error reporting is off. But what should I actually log? I can&#8217;t log all errors, so I should to choose some most errors-probable places in the code and call the function with some message to log this. Should I use try-catch to do this? And is it actually the best way to do this?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/AYOzJ.png?s=32&amp;g=1\" \/><br \/>\nNullPoi?te?<br \/>\nphp mysql<br \/>\nPHP variable not working in sql query..Am just a begginer in php. pls tell where am going wrong.thanks in advances.$sql = &#8216;SELECT email_id FROM dealer WHERE dealerid=&#8221;&#8216;mysql_real_escape_string($id).'&#8221;&#8216;;$rt = mysql_query($sql); $row = mysql_fetch_row($rt);if($row) {echo &#8220;&lt;h1&gt;Number:&lt;\/h1&gt;&#8221; . $row[0];while($row = mysql_fetch_assoc($rt)) {var_dump($row);} }<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/01d897751cc05dc327dab52633e1c723?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGalen<br \/>\nphp validation date datetime language-agnostic<br \/>\nI&#8217;m working on date validation for a validation library. A date format and a variable containing the date to validate will be supplied to the library.$validator-&gt;validate( $_POST[&#8216;date&#8217;], &#8216;m\/d\/y&#8217; );It&#8217;s pretty easy to do basic validation with DateTime::createFromFormat()if ( DateTime::createFromFormat( $format, $date ) !== false ) {\/\/ &#8220;valid&#8221; date }My issue is that with this method invalid dates such as 23\/23\/23 pass because the DateTime class will shift the date and set it to 2024-11-23. I<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/eIOEk.jpg?s=32&amp;g=1\" \/><br \/>\nDarkCthulhu<br \/>\nphp string utf-8 comparison<br \/>\nI&#8217;m trying to compare two string lets say \u00c9milie and Zoey. Well &#8216;E&#8217; comes before &#8216;Z&#8217; but on the ASCII chart Z comes before \u00c9 so a normal if ( str1 &gt; str2 ) Won&#8217;t work. I tried with if (strcmp(str1,str2) &gt; 0) still don&#8217;t work. So i&#8217;m looking into a native way to compare string with UTF-8 characters.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bc66db28aa7c3fa8e4ce4238b696dee9?s=128&amp;d=identicon&amp;r=PG\" \/><br \/>\nThiefMaster<br \/>\nstring r ggplot2 aesthetics<br \/>\nThis question already has an answer here:Use character string as function argument2 answersI have the following problem.I want to turn a string e.g&gt; a&lt;-paste(&#8216;x=col1,y=col2,fill=col3&#8242;)into a form that aes_string accepts like this: x=&#8217;col1&#8242;,y=&#8217;col2&#8217;,fill=&#8217;col3&#8217;this is part of a function:&gt;fun&lt;-function(data,aes.string=&#8221;){ aes_mapping &lt;- aes_string(aes.string) p &lt;- ggplot(df.data,mapping=aes_mapping ) p &lt;- p + geom_point() return(p) }if i call&gt; fun(df.sam,a) &gt; Error in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b13a3e168d85c7f7f45ae1e54dc9db57?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nArkaitz Jimenez<br \/>\nstring binary erlang<br \/>\nI am writing an erlang module that has to deal a bit with strings, not too much, however, I do some tcp recv and then some parsing over the data.While matching data and manipulating strings, I am using binary module all the time like binary:split(Data,&lt;&lt;&#8220;:&#8221;&gt;&gt;) and basically using &lt;&lt;&#8220;StringLiteral&#8221;&gt;&gt; all the time.Till now I have not encounter difficulties or missing methods from the alternative( using lists) and everything is coming out quite naturally except maybe for add<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fd8fa620f858931b0c098a5887124c2e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nyaki_nuka<br \/>\njava string duplicates<br \/>\nI want to ask a question about avoiding String duplicates in Java.The context is: an XML with tags and attributes like this one:&lt;product id=&#8221;PROD&#8221; name=&#8221;My Product&#8221;&#8230;&gt;&lt;\/product&gt;With JibX, this XML is marshalled\/unmarshalled in a class like this:public class Product{ private String id; private String name; \/\/ constructor, getters, setters, methods and so on }The program is a long-time batch processing, so Product objects are created, used, copied, etc.Well, the question is: When I a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/zL1re.jpg?s=32&amp;g=1\" \/><br \/>\nsawa<br \/>\nruby string<br \/>\nSuppose I have a string &#8220;I am a good boy&#8221;. I want the total count of each letter present in the string. Letters are case sensitive. i.e., D and d need to be considered as two different characters.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f653f21fa199ce185e362036771ce44a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMacdiesel<br \/>\npython string md5<br \/>\nI&#8217;m working on a python project in 2.6 that also has future support for python 3 being worked in. Specifically I&#8217;m working on a digest-md5 algorithm. In python 2.6 without running this import: from __future__ import unicode_literalsI am able to write a piece of code such as this:a1 = hashlib.md5(&#8220;%s:%s:%s&#8221; % (self.username, self.domain, self.password)).digest() a1 = &#8220;%s:%s:%s&#8221; %(a1, challenge[&#8220;nonce&#8221;], cnonce )Without any issues, my authentication works fine. When I try the same line of cod<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f54e86d83eea6143ecc70a485f4e6044?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRohit Jain<br \/>\njava regex string split<br \/>\nI&#8217;m making a text based dice roller. It takes in strings like &#8220;2d10+5&#8221; and returns a string as a result of the roll(s). My problem is showing up in the tokenizer that splits the string into useful parts for me to parse into information.String[] tokens = message.split(&#8220;(?=[dk\\\\+\\\\-])&#8221;); This is yielding strange, unexpected results. I don&#8217;t know exactly what is causing them. It could be the regex, my misunderstanding, or Java just being Java. Here&#8217;s what&#8217;s happening: 3d6+4 yields the string array<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/392edb89f78349bfbb1bc5e6ae66df27?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nromi<br \/>\njava string hex<br \/>\nHelo:I have a question, that I solved in c, but now I want to do it in hava: I have a String like: &#8216;\\x03\\x00\\x00\\x00&#8217; This is representing an hexadecimal value of a integer. I transform to 0x03\\0x00&#8230; And now I want to obtain the integer, but I don&#8217;t know how to do it in javacould someone give me some idea ?Thanks in advance(Is it some way to use this format (&#8216;\\x03\\x00\\x00\\x00&#8217; ) directly without use byte[] arrays? and in C can I use this format directly to build a integer (int)?)<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1c83d772b1c065603c7f20975d8d3552?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMr Lister<br \/>\nc# string numbers find-and-replace<br \/>\nThe string can contains ints, floats and hexadecimal numbers for example.&#8221;This a string than can have -345 and 57 and could also have 35.4656 or a subtle 0xF46434 and more&#8221;What could I use to find these numbers in C#?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/MGhY2.png?s=32&amp;g=1\" \/><br \/>\nhakre<br \/>\nphp string<br \/>\nI have a little problem with my script. When I try to run it I receive &#8220;Parse error: syntax error, unexpected T_STRING&#8221; as long as I have &#8216; sign in my code. When I change all &#8216; into &#8221; then I have the same error. So I have to change all &#8221; into &#8216;. Here is my code:&lt;?phpPutEnv(TNS_ADMIN=&#8217;C:\\Programy\\OracleDeveloper10g\\NETWORK\\ADMIN\\&#8217;);$conn = oci_connect(&#8220;user&#8221;, &#8220;pass&#8221;, &#8220;dbstring&#8221;);if (!$conn){$e = oci_error();print $e;exit;}else{$stmt = OCIParse($conn, &#8220;SELECT password FROM USERS WHERE username=<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e208066867d3d9c32a0a8ec27dbb90c7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAdrian<br \/>\nr truncation<br \/>\nAm I missing something?library(truncreg)n &lt;- 10^4 lambda &lt;- 0.3 # Proba y is taken from component 0df &lt;- data.frame(x=rnorm(n)) df$y0 &lt;- pmax(rnorm(n, 10 + df$x, 5), 0) df$y1 &lt;- pmax(rnorm(n, 2 &#8211; 5*df$x, 2), 0) df$component &lt;- ifelse(runif(n) &lt; lambda, 0, 1) df$y &lt;- ifelse(df$component == 0, df$y0, df$y1) # Mixture of censored regressionsplot(df$x, df$y)model &lt;- truncreg(y ~ x, data=df) # All data model.w &lt;- truncreg(y ~ x, data=df, weights=component) # Only com<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9184179e628ebb8da3dc647e4fbf9dfc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDale<br \/>\nc++ truncation<br \/>\nI have just joined a team that has thousands of lines of code like:int x = 0; x=something(); short y=x; doSomethingImportantWith(y); The compiler gives nice warnings saying: Conversion of XX bit type value to &#8220;short&#8221; causes truncation. I&#8217;ve been told that there are no cases where truncation really happens, but I seriously doubt it. Is there a nice way to insert checks into each case having the effect of: if (x&gt;short.max) printNastyError(__FILE,__LINE); before each assignment? Doing this ma<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5780a1cef01033e7a6d42a93816d1068?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nIra Baxter<br \/>\nwindows logging console truncation<br \/>\nWe build complicated console-based tools that produce a lot of commentary on the console. These tools process a lot of data and so runs are expensive and we don&#8217;t like to do them more often than necessary, especially during testing where we already have to run them repeatedly. During such tests, we often log the result to a file to capture this commentary for inspection:C:&gt; [ourcommand] &gt;log.txt When the application runs to completion, this works great.If the application crashes (illegal mem<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cbc9296df0e91778d1e74c4898d441fa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOldskool<br \/>\nphp string truncation mbstring<br \/>\nMonths ago I made a short code that uses mb_strimwidth() to exactly fit some text into a table cell, putting dots at the end of a truncated string. Now, after some times, I tried to execute that same code and it went out with this error:Fatal error: Call to undefined function mb_strimwidth() in &#8230;I tried to find the mbstring.php file, and when I found the mb_strimwidth() function, I discovered that it is not implemented anymore. How is that possible? But my main question is: how can I get the s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/nZEUQ.png?s=32&amp;g=1\" \/><br \/>\nPeeHaa<br \/>\nphp character-encoding iconv mbstring<br \/>\nIs it possible, prior to converting a string from a charset to another, to know whether this conversion will be lossless?If I try to convert an UTF-8 string to latin1, for example, the chars that can&#8217;t be converted are replaced by ?. Checking for ? in the result string to find out if the conversion was lossless is obviously not a choice.The only solution I can see right now is to convert back to the original charset, and compare to the original string:function canBeSafelyConverted($string, $from<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1bd83dec5fbcd915675ed1f286c877ae?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser575228<br \/>\ninstall phpmyadmin mbstring<br \/>\nhttp:\/\/stackoverflow.com\/questions\/4327230\/phpmyadmin-install-errorsHaving some issues with installing phpMyAdmin. I would like to resolve the following issue, but don&#8217;t have a clue where to start (except maybe php.ini?).Here&#8217;s the error message.The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.And here&#8217;s a related article I found on SO that<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b6116ac3c4b5835c6745570ea73a85c1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nCharles<br \/>\nphp mbstring<br \/>\nI&#8217;m trying to install indefero on a CentOS 5.3 VMware &#8216;box&#8217; and I ran into a problem. Quite early in the installation I get an error that I&#8217;ve been able to narrow down to this:[root@code \/var\/www\/html]# cat x.php&lt;?phpmb_internal_encoding(&#8220;UTF-8&#8221;);?&gt; [root@code \/var\/www\/html]# php x.php PHP Fatal error: Call to undefined function mb_internal_encoding() in \/var\/www\/html\/x.php on line 2I get the same error when calling this script via http through Apache. Now according to the PHP manual the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cbc9296df0e91778d1e74c4898d441fa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOldskool<br \/>\nphp string truncation mbstring<br \/>\nMonths ago I made a short code that uses mb_strimwidth() to exactly fit some text into a table cell, putting dots at the end of a truncated string. Now, after some times, I tried to execute that same code and it went out with this error:Fatal error: Call to undefined function mb_strimwidth() in &#8230;I tried to find the mbstring.php file, and when I found the mb_strimwidth() function, I discovered that it is not implemented anymore. How is that possible? But my main question is: how can I get the s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/0hIfS.png?s=32&amp;g=1\" \/><br \/>\nDanny Beckett<br \/>\nphp centos centos6 phpinfo mbstring<br \/>\nI have tried to install the mbstring module for PHP. I have entered the below commands:yum install php-mbstring \/usr\/local\/apache\/bin\/apachectl restartModule is now installed but the errors has not dissapeared.Fatal error: Call to undefined function mb_send_mail() In my phpinfo(), &#8220;mbstring&#8221; doesn&#8217;t exist&#8230;OS: centos 6 PHP: 5.3.8<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/rlm3Z.jpg?s=32&amp;g=1\" \/><br \/>\nYogesh Suthar<br \/>\nphp phpmyadmin mbstring<br \/>\nI&#8217;m receiving an error message whilst trying to access PHPMyAdmin on IIS 7.5. I&#8217;ve checked phpinfo and have the following information for mbstring;Multibyte Support: enabled Multibyte string engine: libmbfl HTTP input encoding translation: disabled libmbfl version: 1.3.2mbstring.detect_order: no value mbstring.encoding_translation: Off mbstring.func_overload: 0 mbstring.http_input: pass mbstring.http_output: pass mbstring.http_output_conv_mimetypes: ^(text\/|application\/xhtml\\+xml) mbstring.inter<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ec5e90ee2bb62d7c74e58276d74d262d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nspaniard<br \/>\nphp joomla fatal-error mbstring<br \/>\nI got stuck into this problem and I can&#8217;t seem to find a solution.The version of PHP installed in the server is 5.3.22. After installing Joomla and the default sample data I got this error accessing the web site:Fatal error: Call to undefined function mb_strpos() in \/public_html\/site\/templates\/yoo_sync\/layouts\/module.php on line 115I checked the phpinfo page and I noticed that option &#8211;enable-mbstring is missing:I spoke with the hosting company&#8217;s support team and they told me to add the followin<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/16cfe1e91a8e2d66e8f8d08f90049ca7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nzachar<br \/>\nphp symfony2 debian mbstring<br \/>\nI&#8217;m getting errorCall to undefined function FOS\\UserBundle\\Util\\mb_convert_case() app_path\/vendor\/bundles\/FOS\/UserBundle\/Util\/Canonicalizer.php on line 18It occurs when I try to load fixtures.First step was to install mbstring.so ext, so I compiled php with &#8211;enable-mbstringthan successfully copiled mbstring extphpize .\/configure make make installand addedextension=mbstring.soto my php.ini file. Unfortunately I still got that error and php -m doesn&#8217;t display mbstring as loaded extension. What&#8217;s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0485c3c78156b334f60641c7602813be?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSergey<br \/>\nphp symfony2 mamp mbstring<br \/>\nOn my Symfony2 application, I am receiving an error:Fatal error: Call to undefined function FOS\\UserBundle\\Util\\mb_convert_case() in \/Applications\/MAMP\/htdocs\/application\/vendor\/bundles\/FOS\/UserBundle\/Util\/Canonicalizer.php on line 18I am using PHP 5.3.6.Here is my PHPInfo showing that mbstring is enabled:http:\/\/i.stack.imgur.com\/FCMDv.pngIf mbstring is enabled then why is mb_convert_case not being found?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e95f906d1c0b54495bb4685b24569ec3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npatrick<br \/>\nphp apache2.2 mbstring<br \/>\nI want to use simpleHTMLDom in my development environment, a Windows server running Apache 2.2 and PHP 5.3.14 (downloaded from Apache). I want to enable mbstring (extension=php_mbstring.dll), but I see the following error in the PHP logs when I restart Apache:PHP Warning: PHP Startup: Unable to load dynamic library &#8216;C:\\PHP\\ext\\php_mbstring.dll&#8217; in Unknown on line 0The DLL file is there. I found on php.net that nbstring needs libmbfl to work. I can not find how to get libmbfl to work though. I ca<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mohammad php netbeans character-encoding whitespace file-encodings I&#8217;m editing the functions.php file of a WordPress theme and whenever I edit it, even when the edit is adding a single space the server returns error:Parse error: syntax error, unexpected &#8216;}&#8217; in \/theme\/functions.php on line 1 This is where I add the single space:&lt;?php load_theme_textdomain(&#8216;theme&#8217;, get_template_directory() . &#8216;\/languages&#8217;); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3390","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3390"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3390\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}