I've got a Magento store that refuses to keep session information on the front end. Strangly the admin works fine. PHP independent of Magento is able to write sessions. Magentos var/ directory is writable by the webserver. I can even see files being written to var/session.
This site is running on ec2 under nginx. I wasn't having these problems previously under Apache and as far as I can tell the configuration of Magento itself is the same.
Yes this was it. I wasn't able to see this in the Firefox console, but in Chrome I could see the domain was wrong ( although it looked ok in the admin, but maybe I was confused ) updated all cookie_domain fields in core_config_data table and its working. Thanks #datasage
Related
I have an major problem with xenForo Logins on nginx and tried everything foundable out.
The xenForo is not the problem it workes fine on an other apache server but I need to move it to nginx.
I'm using the newest nginx and php7.1, php-fpm and all requested sources for xenForo are installed. Other Sites (like Roundcube) works fine. I use the default site config for all sites with - so far - no problems.
Now, for the problem. When I logi to my xenForo ACP the login works fine but I get immediately logged out. Some times I get logged out a few minutes later, when I change the site. On the user site the login works pretty fine als long as I stay on the forums pages (as the forum, member page, profiles) and get logged out when I use a 3rd party site programmed by me (worked fine on apache without problems).
The xenForo Filesystem is owned by www-data:www-data and chmod permissions are set correctly.
In the php.ini file I set the correct path for the sessions to /var/lib/php/sessions and with an external simple script I proved that the sessions are saved correctly with no problems.
No errors displayed.
As long as I can say, everything works fine just the Login makes real trouble and I get out of ideas.
Maybe someone here can help me and find something I didn't see.
Kind Regards,
//Edit:
I found out that this Problem Not appears on the user site if the "Keep me logged in" button is ticket. Ob ACP there is no such button.
//Edit:
I found out, that the Cookie didn't get dropped, it's still there.
//Edit:
The timezones are correct.
I want to run a project from a client locally for development for obvious reasons.
This is a Magento shop and I've made a copy of the /public folder and the database. Put the /public contents in a Homestead box and imported the database, as it should work just fine for other non-laravel projects which use PHP, MySQL etc, right?
I changed the secure and insecure URL's in the database config table and it seems to work mostly.
The only problem seems to be that when I go to sitename.app:8000/admin it opens the admin page, but when I log in, it redirects to sitename.nl/admin, so the live version..
How does this happen?
I seem to have fixed it already!
go to /public/var/cache and delete all the contents.
First load will be slow because it has to regenerate them but the links will now work as expected!
My Magento site was down yesterday don't know the reason. But after searching i found manually clearing the files in cache /var/cache/ and session /var/session/ directories solve the problem.
My problem is, the site is down again today and again i cleared these directories solved the issue.
I need a permanent solution for this please help.
Contact server provider and check if the server space is enough to run a Magento website (magento creates session, cache files inside the file system).
Check file/folder permissions are correct (http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html).
If you need to clear cache directory automatically, ask the server provider to setup a cronjob to clear the cache directory in a specific time period (https://magento.stackexchange.com/questions/84186/automatically-refresh-cache).
Note: this issue is not related to Magento installation, this is something related to the server. Also ask Magento related question here: https://magento.stackexchange.com/
I hope this helps.
I have the Kunstmaan CMS bundles (Symfony 2.4 version) installed on a project that had been working fine until a system update a couple days ago; now, when attempting to log into the admin panel (/en/admin; /en/login) I get redirected to the homepage as an anonymous user, unless I explicitly check the "Remember Me" option in the login form.
This same issue arose simultaneously across all projects using these bundles, including ones that hadn't been modified in weeks.
The admin user last_login is being modified in the database, so it is getting as far as successfully validating the login credentials, but the user session is not being updated.
I'm running CentOS 6.5 on a VM, and the following packages are all the ones that were updated that seem to have anything to do with the web hosting environment:
httpd 2.2.15-31.el6.centos.x86_64
nodejs 0.10.29-1.el6.x86_64
nodejs-devel 0.10.29-1.el6.x86_64
nodejs-packaging 7-1.el6.noarch
php54w-5.4.30-1.w6.x86_64
php54w-cli-5.4.30-1.w6.x86_64
php54w-common-5.4.30-1.w6.x86_64
php54w-gd-5.4.30-1.w6.x86_64
php54w-intl-5.4.30-1.w6.x86_64
php54w-mbstring-5.4.30-1.w6.x86_64
php54w-mysql-5.4.30-1.w6.x86_64
php54w-pdo-5.4.30-1.w6.x86_64
php54w-process-5.4.30-1.w6.x86_64
php54w-tidy-5.4.30-1.w6.x86_64
php54w-xml-5.4.30-1.w6.x86_64
The problem happens in all browsers.
I've been pulling my hair out over this for hours, so if anyone has any thoughts it would be appreciated.
Thanks.
Found the problem.
My project was saving the sessions to %kernel.cache_dir%/sessions. Because I'm hosting the project in a VM, but editing the files from my workstation proper, the permission structure in my projects dir is a bit odd; Apache is running as apache:apache while the ownership on sessions dir was 1000:1000, and the session files within are rw------- 1000:1000. Apache can't write to these files.
This had been working fine previously, so in my last system update something apparently either changed the permission structure somewhere, or started stricter enforcing of a messed up system that had no business working in the first place.
Rather than muck around with the permissions in that dir, I just changed the symfony framework config:
framework:
session:
save_path: /tmp/myprojectname
Problem solved, and I can log in normally.
You should fix your /path/to/app
E.g. http://127.0.0.1:8888/web/app_dev.php/en/admin/login
If you are still having issues: I have recorded my notes here.
Using Wordpress-Heroku and ran into some issues. Changed my app name from heroku's autogenerated name to something more descriptive, but /wp-admin gets redirected to the old name. Of course there's no such app anymore. Also tried to set up a local version but found that going to localhost:8888/wp-admin redirects me to app on heroku.
I guess that something in the installation process creates permalinks to the site address in the database. Is there a way to fix this without resetting the installation?
I change servers (copying live sites to localhost) fairly frequently following the Codex. While not on Heroku, I assume the process would be the same.
In your case, the Search and Replace for WordPress Databases Script mentioned should do the trick (after backing up the database, of course).
I assume you've updated your wp-config.php to point to the new database.