Zencart 1.5.X – login does not work – session / cookie problem – explained
来源:互联网 发布:webstorm 结对编程 编辑:程序博客网 时间:2024/06/06 05:41
Zencart 1.5.X – login does not work – session / cookie problem – explained
This post is a consequence of an hour long pain in the …. finding a weird session issue in the latest Zencart 1.5. I had a subdomain for development version like (dev.blahbla.com). Everything was good except login does not work – whereas I can even add products to cart (which should mean my session is working!!). So it took me an hour to figure out Zencart has made some change regarding the cookie domain in the latest version (I don’t want to explain as it does not matter to most of us). Read this post if you are having any of the following issues:
- You cannot add to cart or login, your session does not work at all
- You can add to cart but cannot checkout as it ask you to login again and again saying your session expired
- Your live site works perfect but the development site (a subdomain) does not work with the exact same code (my case)
For Zencart version >= 1.5.X
Things are made easier now removing the option from configuration file to save your session in file. Now there is nothing to check in ‘includes/configure.php’. Everything is in Admin. By default there is almost no reason to have session issue if your database username/password is correct (which is something you can’t miss)
Login to admin. Go to Configuration >> Sessions
- The first thing I would ask you to try is setting “Add period prefix to cookie domain” to false. This harmless looking configuration creates issues in subdomains. Latest version has thought of only www.blahblah.com but if you have a domain dev.blahblah.com, it will put 2 dots in front of your cookie domain and your session will not work until you turn “Recreate Session” to false.
- If your login is still not working, the second option is to set “Recreate Session” to false. But this would be the worst thing you would want to do as it adds a security leak into your website of hijacking anyone’s session. Except very few hosting, this has never been needed.
You may play with the rest of the configurations, but I don’t think any Zencart 1.5.X user will need anything else.
For Zencart version < 1.5
For older versions of Zencart, do the following:
- Open the configuration file ‘includes/configure.php’. Check the definition STORE_SESSIONS. Remember the value.
- If STORE_SESSIONS value is db, login in to admin and follow the instructions given above for version 1.5.
- If STORE_SESSIONS value is blank (”), login to admin. Go to Configuration >> Sessions and check if the “Session Directory” is set to correct path. If the path is correct, make sure the session directory has been made writable by webserver.
Easy way to do it is, make the directory permission 777.
(Linux command for permission: chmod -R 777 /your/session/directory/path/)
If you are still having issue with session, follow the instructions given above for version 1.5.
Hope this saves you some time.
- Zencart 1.5.X – login does not work – session / cookie problem – explained
- "+y does not work
- MR_SHORTHAND does not work
- How Does Caching Work in AFNetworking? : AFImageCache & NSUrlCache Explained
- How Does Caching Work in AFNetworking? : AFImageCache & NSUrlCache Explained
- Why "RefreshRecord" does not work
- Cognos Schedules does not work
- UIStatusBarStyle PreferredStatusBarStyle does not work
- SCAN listener and Node listener – How does it work
- IDLE_TIME DOES NOT WORK TO SPECIFY WHEN A SESSION IS AUTOMATICALLY SNIPPED
- basename() does not work with Japanese
- "hadoop fs -conf " does not work
- Hard Work Does not Pay Off
- Document ID does NOT work issue
- error:The C++ compiler does not work
- Hard Work Does Not Pay Off
- how-to: resolve crontab does not work
- Cognos Scheduled Report Does not Work
- 搭建属于你的网站 记录下搭建个人网站探索之旅
- Linux学习--命令(1)
- 关于Makefile查找目标文件和make -f执行make的问题
- Lua之pcall和xpcall之学习
- 单片机的中断系统
- Zencart 1.5.X – login does not work – session / cookie problem – explained
- 33 Search in Rotated Sorted Array
- 进程内存信息 /proc/[pid]/maps /proc/[pid]/smaps /proc/[pid]/status
- beego入门教程
- 学习笔记 --- DM9000网卡原理与基地址设置
- 按钮内部文字(titleLabel)和图片(imageView)的位置排布方式
- Vuforia开发基础-官方demo编译
- 碰到java中base64编码换行
- MBaaS – IBM Mobile Cloud Services, Bluemix & MobileFirst