Session issue in codeigniter for arabic character

2019-07-17 19:11发布

问题:

I am just stuck with a issue regarding session. I have a multilingual ecommerce site for english and arabic language. In case of arabic language when someone registers with a arabic name, description or such fields s/he can register successfully. But during login the session data being lost.

Actually when setting all the data into a session array its being stored and i tested it by printing the array. But after the valid authentication when user being redirected to index page or profile page then the session array disappears. The full array being lost. and login doesnt working. Its only happening for someone who has arabic fields on their data. for english its perfectly ok.

I have removed the session.php from syatem/libraries directory. Then it works only on localhost, on server it creates problem when ordering or viewing items of a particular org.

Any suggestion will be accepted cordially.

Thanks

回答1:

Thank u so much all of u for your reply.... and my issue has been solved.

Unfortunately my session table user_data field collation was not utf8_unicode. Thats why the data was being lost when it redirects to home page. Since it is using the ci_session table. Its working now nicely.

Before posting the question i have tried using native session, updated the Session.php file on system/libraries....But haven't got the perfect solution.

But finally could have figured out the silly mistake and done with the issue.

Cheers to all....:D

Thanks



回答2:

Please try to use Native Session instead of default CI_Session and see if your problem will be solved?

Here is a link for you:

https://github.com/appleboy/CodeIgniter-Native-Session



标签: codeigniter