This forum is archived. Posts are preserved for historical reference. For current help, join us on Discord.

token doesnt match error

In UserSpice 4.3 and Below · Started by meetmec12 on 2016-12-16 8:05 pm · 37883 views · 18 replies

I install US without issues on my localhost now on a live server I get token error when I logon a admin with the default password. My path was weird during installation and my server is not localhost (mydoainhost.blabla)
What version are you using?
4.2beta
Errors are not displayed on my live server either.
i was able to see error by removing slashes in the code @ login.php and i saw this error :
Warning: session_start(): open(/var/php_sessions/sess_183cd0727993acd3f4ed7ee4e855e1fc, O_RDWR) failed: No such file or directory (2) in /hermes/bosnaweb16a/b3000/ywh.ranminise/portal/users/init.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hermes/bosnaweb16a/b3000/ywh.ranminise/portal/users/init.php:2) in /hermes/bosnaweb16a/b3000/ywh.ranminise/portal/users/init.php on line 2

actually my path is mydomain.com/portal but i saw '/hermes/bosnaweb16a/b3000/ywh.ranminise/portal/' while installing . Thanks inadvance
From my knowledge of session functions . it has to be the first code on the page. I checked the loing.php and join.php session function was written first . still waiting for help @ admin
I need help on this some one shld kindly check my issue thank u
It definitely sounds like a server configuration issue. What version of PHP are you running? What type of server (Apache/nginx/iis)?

The deal is that a random token is generated every time that page is loaded, and then compared when a form is submitted or action is taken on the page. So if the token in your browser is not the same as the one that the system thinks it generated, you will get an error.

The two reasons you would get an error is that someone is attacking your server trying to perform a cross site scripting attacks or you have some sort of misconfiguration where the server is reloading the page (and hence regenerating the token) in the background.

My gut says you're using an older version of php.
Thanks @Modmin MySQL Version:5.6.32 ,PHP Version:5.5.22



Do you have a way to change to php version 5.6?
In addition , Document Root is /home/users/web/b3000/ywh.ranminise and i view my US site via http://ranminise.com.ng/portal/ users folder in http://ranminise.com.ng/portal/users Platform Type : Debian, System Linux boscustweb3101.eigbox.net 3.14.77 #1 SMP
'Do you have a way to change to php version 5.6?' if that is the solution i must no going back on US now I love it I also want to knw if my path is not an issue Domain name http://ranminise.com.ng/portal/ (a subDomain) and Document Root /home/users/web/b3000/ywh.ranminise
There are 3 or 4 places where path could be causing you an issue. The main reason userspice uses relative paths is to allow you to move the app from one server to another with only minimal configuration (or no configuration if you use the same db name/pw etc.).

The first is the redirect after login script we talked about. You can always put the full url in there.

Second is all the settings in the admin panel (like for google/fb logins and things like that). Other than that, the path shouldn't be an issue. I think the things you're seeing are because you're on a linux server which means that userspice is detecting the "true" path. Sort of like how if you are on xampp or something for localhost, your browser would see

localhost/userspice
where your computer might see
c:\xampp\htdocs\userspice

We have hundreds of thousands of downloads and those things haven't been an issue since the early days of 4.0 and before BUT if a php version upgrade doesn't fix it, we could definitely look further.
Thank you i will upgrade my php and try on anther server as well How ever my local US site runs on php 5.5.1.9 and it works fine
I still think you have some sort of server misconfiguration, but upgrading your php won't hurt.

My other thought is if you have some sort of .htaccess file that could be rewriting your urls and causing an issue. It could be in any of the parent folders of your userspice install. You can temporarily rename and give it a shot.
Its definitely the server I just installed on a new server and it worked without issues . I still want it on the error prone server though . will keep u posted .thanks
Case resolved . I had a chat with the host and they said they don't support php framework . poor them . av moved my project to a better server . Thanks for your time
Editing my php.INI file solver all issues . cookie path was / I changed it to "/" .
Awesome! Glad that worked!