Forums | Mahara Community

Support /
Migration Server, changing server


Harold DESGENS's profile picture
Posts: 5

24 November 2020, 10:22

Hi guys,

I saw many topics about this issue but i didn't find solution.

I want to put my Mahara on a new server so:

- i have dumped my database (mysqldump) --> restored to new server

- copied dataDirectory to new server

- copied web server Mahara directory to new server

- modified config.php file

- permissions and owers directory are ok

So when i try, login page appears correctly but when i put username and password it tells me

"Something in the way you're interacting with Mahara- AFTEC FORMATION is causing an error.
Details if any, follow:
Logged out user can not be stored in usr_session"

I tried so many things....please someone can help me ?

I use 19.10rc2 version

Robert Lyon's profile picture
Posts: 774

24 November 2020, 12:07

Hi Harold,

Interestingly you should only get that error if the person you are trying to login with has an ID = 0

I assume that the user you are trying is not not saved in the database usr table with id = 0

So it sounds like there is an issue with the login saving the session correctly.

Is the new server a newer version of things like PHP ?

Can you go to the dataroot (setting in config.php)  subdir called 'session' and delete the 0 subdir, eg rm -rf 0

On reloading of a page in Mahara it should cause your site to remake that directory (and any missing session directories) again.

Does this happen? and can you login now?

Cheers

Robert

Harold DESGENS's profile picture
Posts: 5

24 November 2020, 13:53

Hi Robert,

Yes on new server, php is more recent 7.3.19

On old server php 7.3.11

So i have done what you told me, i've removed the 0 folder and at reloading page it was recreated automaticaly.

The subdir 6 was also created...(i haven't seen that it was missing).

And then i could login without errors.

So it works like a charm. Thanks Robert i spent my afternoon on that.

Could you explain me what happend ?

many thx

Robert Lyon's profile picture
Posts: 774

25 November 2020, 10:01

Hi Harold,

I'm not sure why on migration all the session subdirectories didn't get migrated. But because there were missing ones it meant that if you logged in and the session for the person was meant to be saved in a subdirectory that was missing, which it couldn't. it meant that in reality they were still a 'guest' -> ID = 0 and so you got that error.

There is some code in Mahara that checks if subdirectory 0 is missing - like it would be if you were first setting up a site and goes and builds all the subdirs (if they don't exist) that sessions will need.

So I just used that process to get it to make all the missing ones in your session directory.

Cheers

Robert

4 results