Forums | Mahara Community
Login fails with Mahara 18.10 using Ubuntu 18.04 and PHP7.2
28 October 2018, 22:23
with the release of Mahara 18.10 I tried to switch to Ubuntu 18.04 (PHP 7.2.x) instead of Ubuntu 16.04 (PHP 7.0.x).
Reasons for the switch:
- A later Version of Apache which is capable of http/2
- Use of PHP7.2 (Ubuntu out of the box verion of PHP 7.2)
First I thought it would work fine due to bug #1767945 in Launchpad which was about problems with PHP7.2 in Mahara. But it did not. I wasn't able to log into Mahara anymore after using Ubuntu 18.04 and PHP 7.2. I got a similar behavior as it was described for Windows (Launchpad Bug #1799933 ), where the code says that the site isn't available at the moment. As soon as I switched back to Ubuntu 16.04 and PHP7.0.x again, everything worked fine again.
I would be a lot more relaxed about all this, if PHP 7.0 wouldn't reach end of Life at the end of this year and if in the system requirements part of the README.md for Mahara 18.10 it wouldn't suggest between the lines that everything beyond PHP 7.0.x is not yet tested enough with Mahara.
My question at this point is: When will Mahara become tested and usable with PHP 7.2, such that one may use Ubuntu 18.04 out of the box as OS for Mahara?
Many thanks in advance for all the information!!
31 October 2018, 7:12
I have Mahara 18.10 running on Ubuntu 18.04 - and have added some info to https://wiki.mahara.org/wiki/Developer_Area/Developer_Environment#The_long_version_.28for_Linux.29 about what packages you need to have installed for 18.04 and possible problems/issues
Also are you able to check the error logs to see what the underlying problem was for the generic 'site isn't available' message?
Also you might need to delete the 'dwoo' sub-directory in your dataroot (dataroot path is defined in your config.php file) and let the Mahara system rebuild the directory / cached files on page load
31 October 2018, 10:31
I tried it with your hints. I also deleted the dwoo directory. But I got the message you mentioned again.
I got the following things in the apache logs:
[[WAR] 37 (auth/session.php:567) session_regenerate_id():
[WAR] 37 (lib/errors.php:535) [Error]: Failed to create(read) session ID: files (path: 3;
[WAR] 37 (auth/session.php:447) Undefined index: messages,
[WAR] 37 (auth/session.php:447) Invalid argument supplied for foreach(),
[WAR] ab (lib/errors.php:535) [Error]: Unsupported operand types
I can not post the log here due to forum checks for new posts.
This looks for me as if there is still something in the code that does not work for php7.2.
Many thanks in advance for your help!
31 October 2018, 12:18
Ah, that error!
Ok, the problem here is due to how older PHP saved file based sessions vs newer version (older sessions began with a char 0-9 or a-f, newer versions use 0-9 or a-v).
To fix this up you will also need to go into your dataroot directory (path is defined in the config.php file) and delete the 'sessions' sub-directory as well. The sessions directory and correct sub-directories will be automatically generated again.
31 October 2018, 19:18
many many thanks for your help!!!!
Now it works fine.
The trick with the sessions and the dwoo directory, I did not know. Maybe I missed some documentation about Mahara 18.10.
Anyway, many many thanks!!!