The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
users/admin.php ERROR 500 // SOLVED - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: users/admin.php ERROR 500 // SOLVED (/showthread.php?tid=1210) |
users/admin.php ERROR 500 // SOLVED - JUG - 11-13-2018 Suddenly users/admin.php page is not reachable. I get ERROR 500. Everytime I try to access /users/admin.php I get mail in /var/mail/ Code: From jakob@server.oblak.ersim.si Tue Nov 13 18:03:01 2018 Last line of this mail I do not understand. I know that oblak.ersim.si/admin.php cannot be found because it does not exist. But why the server wants to load oblak.ersim.si/admin.php instead of oblak.ersim.si/users/admin.php? Userspice is running on debian with apache2. I get no PHP errors in apache2/error.logwhen accessing users/admin.php. Other pages are working correctly like users/admin_pages.php or users/admin_users.php. I did not change any file in users/ folder. I already tried to replace users folder with backup image. Is this some redirection mistake or where should I look to solve this problem. EDIT 1: I deleted admin.php from server and got Not found (which is expected). Now I make a copy of admin_users.php and rename it to admin.php. Browser now shows users/admin.php so I believe there must be some error in the admin.php file or sth? EDIT2: Looks like that I had error.logs from apache disabled. I dont know why. So now I got some errors. Code: PHP Notice: Undefined property: stdClass::$is_read in /var/www/html/users/classes/Notification.php on line 40 Code: $this->_results = $this->_query->fetchALL(PDO::FETCH_OBJ); So I went reserching my DB. I have found that I had similar number of lines written to audit table (somewhere in the neighbourhood of 1050x10E6). So I tried to delete some lines (about 1k) with no success. Then I truncated whole table and boom. It works like it should. users/admin.php is again reachable. I believe this is a bug in userspice. I believe that audit inserts should be automaticaly deleted when there is more then, lets say, 100k lines. Also bug from Notification.php should be addressed. EDIT:3 oh and by the way, error with Notification.php is not present just on admin.php page but on all pages. RE: users/admin.php ERROR 500 // SOLVED - Brandin - 11-14-2018 The notification error would be an issue with your database, more than likely being outdated. What Version of UserSpice are you running? What updates are applied in the migrations/updates table? And as a whole, UserSpice will never implement a function to automatically truncate or remove data from any table, especially the logs table. If you wish to do this, please do it on your own. RE: users/admin.php ERROR 500 // SOLVED - JUG - 11-14-2018 (11-14-2018, 05:48 PM)Brandin Wrote: The notification error would be an issue with your database, more than likely being outdated. What Version of UserSpice are you running? What updates are applied in the migrations/updates table? And as a whole, UserSpice will never implement a function to automatically truncate or remove data from any table, especially the logs table. If you wish to do this, please do it on your own. In this case, admin could be warned that DB is reaching memory limit set by the userspice. I'm using latest userspice with all updates. I also did not change database except my own tables. Regards, Jakob RE: users/admin.php ERROR 500 // SOLVED - Brandin - 11-14-2018 Does your notifications table have an is_read column? RE: users/admin.php ERROR 500 // SOLVED - JUG - 11-14-2018 Amm I dont have notification table. RE: users/admin.php ERROR 500 // SOLVED - Brandin - 11-14-2018 That would be your problem... RE: users/admin.php ERROR 500 // SOLVED - JUG - 11-14-2018 Shoud I manualy create one? What columns do I need? RE: users/admin.php ERROR 500 // SOLVED - Brandin - 11-14-2018 I would download a fresh copy of UserSpice, install it, and export the Notifications table from there, or review the .SQL file within the install directory and steal the notifications table creation script from there. RE: users/admin.php ERROR 500 // SOLVED - JUG - 11-14-2018 Ok Brandin, thank you! |