Session issue in codeigniter for arabic character - codeigniter

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

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

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

Related

Magento Customer Login Issue - Login Page Keeps Reloading On Login

So I found several variations of this issue and tried the solutions; none worked.
So customers are not able to login with the correct username and password. The login screen (https://www.example.com/customer/account/login) just refreshes when the credentials are entered correctly -- should redirect to the My Account Dashboard.
The only thing that seems to temporarily work (few hours at a time before the problem comes back) is when we change back and forth the System > Config > Web > Session Cookie Management > Cookie Domain to "https://www.example.com" and ".example.com" Then we flush the Magento Cache and we flush the Storage Cache and refresh the all Cache Types.
After this, Customers can login on Firefox, Safari and IE, but not Chrome (same login page looping issue).
We have exhausted everything we can think of. No errors in the logs and we have the correct getBlockHtml('formkey'); ?> code in the login.phtml files. We are using a custom theme and noticed this problem after migrating the site from Enterprise Edition to Community edition.
Any suggestions would be greatly appreciated!
Thanks for reading this article and opportunity to post my answer here.
I also faced same problem which AShah faced. I also googleing but did not find such proper result. Finally I removed or clean the session folder (root>var>session) and its works fine for my store.
Hope this trick will solve you. thanks
First check what are the values set for following path in core_config_data
table
web/cookie/cookie_path
web/cookie/cookie_domain
Try by replacing any existing value by NULL.
Following should be set to 1
web/cookie/cookie_httponly

Magento : the cart is always empty

I've been looking for several days now and the problem is stil there.
I'm running the following version of Magento :1.9.0.1
I do not experience any particular problem on local (using Mamp). But on my production server my cart page (beginning of the checkout process) is always empty no matter the number of items i try to add inside my cart.
I tried lots of different solution posted on many websites but nothing seems to solve it (since this is working on local it might be a server configuration problem).
Any suggestion ?
Thank you
(Ps: English is not my main language so i'm sorry for the poor syntaxe).
Are you able to login to the site?
Just check in the backend. System->Configuration->Web->Session cookie management
Whether there is a wrong value set for cookie domain
I finally found the answer. The problem was related to a theme template module. I remove the module and it's working now.
Ty

Use Magento rest API with multi store view

I have a Magento website with 3 languages on 3 different store view. I need to retrieve product information through the rest API, accessing to this address:
http://-mysite-/api/rest/products
It works really fine, but I receive data only from the default store view. In my webapp I need to switch languages, and I need to access to the others store view. I read the documentation (http://www.magentocommerce.com/api/rest/introduction.html), but I cannot find anything about store view and multilingual sites... I tried passing language in the header or passing the store_id as "get variable"... nothing, it works only with the default store view. Any idea?
You can try this. magentomysite/api/rest/products/store/storeid . For example you can use as magentomysite/api/rest/products/store/1 for english store products.
Remember one thing. In the admin panel you have to give permissions to guest user also. Then only you can get the data through this url.
I hope this helps u.
To elaborate on Pavan's answer the following URL worked for me:
magentodomain.com/api/rest/products/:product_id/store/:store_id
You can find your store id with the following method explained in this answer:
How to find out what my store ID is?

User Is Logged Out When Generating PDF with DomPDF & Joomla 2.5

I have integrated DomPDF with a Joomla site that I am working on. I followed the Creating PDF Views article to achieve this and generating PDFs works well except that when the link is clicked and the PDF is generated from the component the user is logged out. I am using Joomla 2.5 & DomPDF 0.6.0 beta 3, the content for the PDF is generated from a custom component but right now it is just flat HTML and follows the instructions in the article for generating the view. I have looked at the code but can't seem to see where the problem is. Any help is greatly appreciated.
EDIT: The user does not get logged out if 'Remember Me' is checked on login. Also didn't mention that I am using Database as the setting for sessions.
Check the custom component that clearing the user object or not.
Any where session_destroy() or unset($user) or any other Factory call to reset the user object.If you can't find such a statement then the make sure the problem with that PDF creation.
In no way you can't get solution then try this.
Before creating PDF section current logged user object id set to Cookie you mentioned that it was not clearing remember me option.
$user = &JFactory::getUser();
echo $user->id //current logged user id.
and the process PDF again put it back to user object like.
$user = &JFactory::getUser($user_id);//from cookie.
This is not a perfect fix but your problem will solve.
Hope this will help..

Cannot log in or add items to cart in Magento after migrating to new server

I have migrated a Magento site to another server (the same server the database was already hosted on) and I am no longer able to log in or add items to my cart. I have found a few others who have posted about this type of problem but nothing seems to work for me. I have disabled all caching, etc. Ensured that sessions work. Increased the session lifetime. No errors are being logged anywhere. If I enter wrong credentials I get an error. But if I enter the correct information it just keeps returning me to the login page. I have opened permissions completely. Nothing makes any difference! So aggravated. Please help!
Found the issue. Well sort of. I think there was a problem with the timezone (the server I moved to was an hour different from the other) but essentially I resolved the problem by increasing the values for two config items in core_config_data:
UPDATE core_config_data SET value=86400 WHERE path='web/cookie/cookie_lifetime';
UPDATE core_config_data SET value=86400 WHERE path='admin/security/session_cookie_lifetime';
The first query fixed the shopping cart problem, the second the admin login problem.
Again I think there is a mitigating factor here as well, but this at least got me over the hump.

Resources