Web based family history software

This Help forum is for issues relates to the latest release (1.7.5). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

Question PHP Error After Migrating to Ubuntu 16.04 LTS/PHP7

  • moetjojo
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #1 by moetjojo
Hi, after migrating to 16.04.1 on a new server with PHP7, I copied all of my existing webtrees files from my previous server. I replicated the DB connection settings. I now get the following PHP error on my site index page:

#0 unknown:unknown ErrorException("session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions)")
#1 /app/Session.php:107 session_regenerate_id()
#2 /includes/session.php:417 regenerate()
#3 /index.php:31 require()

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 7 months ago #2 by fisharebest
Replied by fisharebest on topic PHP Error After Migrating to Ubuntu 16.04 LTS/PHP7
It would appear that:

Your server is configured to store sessions in the folder /var/lib/php/sessions/
Your server is not configured to allow PHP scripts to read/write files in this folder.

You should investigate the permissions of this folder.

(The default PHP behaviour is to store sessions in files, like this. However, webtrees
overrides this default to store sessions in the database. Your server appears to be
ignoring this?)

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • moetjojo
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #3 by moetjojo
Hi, this folder is writable.

drwx-wx-wt 2 root root 4096 Aug 10 12:19 sessions
ubuntu@ip-172-31-12-85:/var/lib/php$

Do you know where webtrees specifies to write to DB rather than files?

I found a similar issue on another application which appears to be down to how PHP7 handles a FALSE string, returning an error instead of returning as empty string. github.com/Inchoo/Inchoo_PHP7/issues/4

Unsure if this is related. All of my webtrees files contain no modification to the version working on my existing server running PHP5.

Thanks

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 7 months ago #4 by fisharebest
Replied by fisharebest on topic PHP Error After Migrating to Ubuntu 16.04 LTS/PHP7
> which appears to be down to how PHP7 handles a FALSE string

Which version of webtrees?

The issue that you are refering to was fixed at the end of last year.

github.com/fisharebest/webtrees/commit/f...b3d6f2b59906acee9b8e

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}