• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Diacritical marks are truncated via Active Record

Ubuntu 12.04.5
PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)
MySQL 5.1.73a
CI 2.2

The same problem occurs in my development environment:

OS X 10.10.1
Apache/2.4.9 (Unix)
PHP 5.5.18 (cli) (built: Oct 20 2014 16:18:57)
MySQL 5.5.38
CI 2.2

The codebase and database configurations are identical in both environments (same git repo).

Looks nothing special. Can you do a test also with CI 3?


You can try this statement before you build your query .. nothing more i my mind ;(

PHP Code:
$this->db->query('set names utf8'); 


I inserted that line before the update() and before the insert(), but the string still truncates in both cases. I'll try it with CI 3 now, to see if the results are different.

During the CI 3 install, I received a fatal error:

Fatal error: Cannot redeclare class UserInfo

My UserInfo class is not seen as "redeclared" in CI 2, so why is it so in CI 3?

Is the first letter of your class Uppercase?


Yes, the first letter of the class is uppercase. Our CI application has been in production for a few years now so it's stable. The first time we've run into problems we couldn't resolve via a google search has been this issue with diacritical marks. Coincidently, I posted another issue here earlier this week, but that has only to do with my local dev (OS X) environment. Mcrypt is installed properly but not recognized by CI 2.2. See: http://forum.codeigniter.com/thread-324.html

I mention this in case the Mcrypt issue is related to the CI 3 install problem.

This error means, you've already created a class with the name UserInfo. Can you check your files if there more then one "class UserInfo" includes?


I verified that there is only one "Userinfo" class defined. If there were more than one class with that name, wouldn't CI complain under version 2.2 as well?

But what's interesting to note, is that Userinfo is extended a couple of times. It's a child, of a child of the CI_Model class. These classes control cookie management which of course rely on the Session class. And from installing CI 3, I noticed that the Session class is now loaded as a driver instead of as a library. Is this a big difference? Could that be part of the problem? What's more, the Session class requires mcrypt! My new friend mcrypt. Smile

Thanks for staying with me on this, Rufnex. It's very helpful to have your eyes on this.

Is this topic still open? You have realy a new best friend called mycrypt Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.