Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
temabu
Experienced
Topic Author
Posts: 36
Joined: 26 Sep 2008, 17:13

New user errors on hosted installation (ulumulu.com)

22 Aug 2022, 02:25

Hi. When adding new users and selecting a default folder, when a user logs in they see the error below. Is this a bug and how can I fix it?
Code
Deprecated: Optional parameter $path declared before required parameter $user_id is implicitly treated as a required parameter in /srv/users/serverpilot/apps/x3-ulumulu/public/panel/filemanager_user_core.php on line 1614

Deprecated: Optional parameter $sort_with declared before required parameter $user_id is implicitly treated as a required parameter in /srv/users/serverpilot/apps/x3-ulumulu/public/panel/filemanager_user_core.php on line 1614

Warning: session_start(): Session cannot be started after headers have already been sent in /srv/users/serverpilot/apps/x3-ulumulu/public/panel/filemanager_user_core.php on line 4
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: New user errors on hosted installation (ulumulu.com)

22 Aug 2022, 03:01

This is a combination of PHP 8.1 with "deprecated" warnings enabled (should not be enabled in production environment) ... Assuming this is your own server? And of course, some code in that users-specific filemanager_user_core.php needs to be updated to not throw warnings under PHP 8.1. Fix it like this: Open /panel/filemanager_user_core.php in text editor.

Line 2:
Code
if(session_id() == '')
{
    session_start();
}
Change to:
Code
if(!isset($_SESSION)) session_start();
Line 1614:
Code
function __construct($show_root, $path = '', $sort_with = 'date', $user_id , $search = '')
Change to:
Code
function __construct($show_root, $path = '', $sort_with = 'date', $user_id = 0, $search = '')
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: New user errors on hosted installation (ulumulu.com)

12 Sep 2023, 06:10

This was fixed in X3.32.0. See release post:
photo.gallery/blog/photo-gallery-x3-32/

See forum announcement for comments:
viewtopic.php?f=51&t=10653