[SOLVED] Suddenly Unable to Register New Users

Backend functionalities: user management, course management, reports, certificates, etc.
AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

[SOLVED] Suddenly Unable to Register New Users

Post by AndrewL »

Hello,

We've got Forma 2.3 installed on a Windows 2016 server, using PHP 7.0.33. We installed it successfully last week and we created a few new users while exploring the functionality of the software. However, after about a day of creating courses, etc., we were suddenly unable to register new users anymore.

We're able to click "register" on the home page and navigate to the registration form for a new user. But when we fill out the form and click "register," instead of being redirected to the login page, we get a page with no body content but the word "Array," for some reason. I've attached a screenshot of that page.

When this happens, the new user information is not saved in the new users table, and there is no verification email sent to the new user's address. There are no errors reported in the console.

We have tried reverting the few settings we had changed in the admin dashboard, but none of this returned the registration functionality.

We had the Forma debugging enabled, but we have no idea how to make use of it. We can't find any instructions in the documentation for the debugging.

1. Has anyone experienced this problem before? Does anyone know how to fix it?

2. Can anyone explain how the Forma debugging works? Or direct us to some documentation for it?

3. Is there any kind of error logging in Forma?

Thank you,
Andrew
Attachments
This is the screenshot of the page after the registration form.
This is the screenshot of the page after the registration form.
Last edited by AndrewL on Fri Jul 03, 2020 9:46 pm, edited 1 time in total.

alfa24
Senior Boarder
Posts: 926
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Suddenly Unable to Register New Users

Post by alfa24 »

May I ask how are you enabling debug?
I'm Jasmines, the One. If you need, you can contact me.

AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

Re: Suddenly Unable to Register New Users

Post by AndrewL »

By going to Settings > System Configuration > Settings > Advanced, then checking the "Activate language editing" and "Enable debug information" options, as seen in the attached screenshot.
Attachments
debug.png

alfa24
Senior Boarder
Posts: 926
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Suddenly Unable to Register New Users

Post by alfa24 »

It's not the right way.
You have to enable it in config.php
Replicate the operation (you'll have many notices and warnings but don't worry about them) and post the fatal error here.
Differently you can post your web server error log.
I'm Jasmines, the One. If you need, you can contact me.

AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

Re: Suddenly Unable to Register New Users

Post by AndrewL »

Thank you.

I've adjusted the config.php file to what you see in the first image below. I changed the value of $cfg['do_debug'] from false to true.

As you said it would, it caused several fatal errors when I tried to load the Forma home page. I took screenshots of all of it; I had to scroll through and take six shots to get all the different messages. I will attempt to attach all the images to this post, but here are all of the unique messages displayed on the page:
  • Notice: Undefined index: notuse_plugin in C:\inetpub\wwwroot\formalms\lib\lib.forma.php on line 31
  • Notice: Undefined index: notuse_customscript in C:\inetpub\wwwroot\formalms\lib\lib.forma.php on line 49
  • Warning: Illegal string offset 'browser' in C:\inetpub\wwwroot\formalms\lib\layout\lib.layout.php on line 312
  • Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PlatformManager has a deprecated constructor in C:\inetpub\wwwroot\formalms\lib\lib.platform.php on line 21
  • Deprecated: Non-static method PlatformManager::createInstance() should not be called statically in C:\inetpub\wwwroot\formalms\lib\lib.platform.php on line 342
  • Warning: Creating default object from empty value in C:\inetpub\wwwroot\formalms\lib\lib.platform.php on line 50
  • Deprecated: Non-static method PlatformManager::createInstance() should not be called statically in C:\inetpub\wwwroot\formalms\lib\lib.utils.php on line 546
  • Warning: in_array() expects parameter 2 to be array, null given in C:\inetpub\wwwroot\formalms\lib\lib.jquerylib.php on line 96
  • Warning: strpos(): Empty needle in C:\inetpub\wwwroot\formalms\lib\lib.jquerylib.php on line 164
  • Warning: in_array() expects parameter 2 to be array, null given in C:\inetpub\wwwroot\formalms\lib\lib.jquerylib.php on line 119
  • Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserManager has a deprecated constructor in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 26
  • Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserManagerAction has a deprecated constructor in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 925
  • Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserManagerRenderer has a deprecated constructor in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 946
  • Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserManagerOption has a deprecated constructor in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2808
  • Notice: Use of undefined constant Docebo - assumed 'Docebo' in C:\inetpub\wwwroot\formalms\appCore\Template\TwigManager.php on line 43
If anyone knows which of these messages is connected to what might be causing the new user registration problem, and/or how to fix it, we would be very grateful for your help. In the meantime, I will walk through the code and try to figure out why these errors & warnings are being thrown.

Also, it seems I'm not able to attach more than three images to this reply, but all of the messages are in the text above. However, if anyone needs to see the screenshot in order to understand the problem, please let me know.

Thanks.
Attachments
config file change 1.png
fatal error message 1.png
fatal error message 2 small.jpg

alfa24
Senior Boarder
Posts: 926
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Suddenly Unable to Register New Users

Post by alfa24 »

None of those is a fatal.
This is because your home page works.
You should ignore the errors and try to register until the "Array" message. There you should have the fatal.
I'm Jasmines, the One. If you need, you can contact me.

AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

Re: Suddenly Unable to Register New Users

Post by AndrewL »

Alpha24, I see. Thank you. I'll post again soon with that error.

AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

Re: Suddenly Unable to Register New Users

Post by AndrewL »

I followed through with the register form submission to the page that outputs "Array" and then realized that there isn't actually a fatal error (i.e. the app doesn't crash; I can still click on the Forma logo and go back to the login page), just the unexpected behaviour (no email sent, no user creation, and the page outputting only the word "Array"). So even with the debug functionality enabled, the flow hasn't changed. As shown in the attached screenshot, I'm getting all the warnings & notices, but still just getting the word "Array" on that screen with no actual error, and I can still click the logo to go back to the login page.
Attachments
array page.png

alfa24
Senior Boarder
Posts: 926
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: Suddenly Unable to Register New Users

Post by alfa24 »

Please try the following:

in /lib/lib.usermanager.php, row 1448

change

return $out;

with:

return var_dump($out);

let's see if we get something more verbose.
I'm Jasmines, the One. If you need, you can contact me.

AndrewL
Newbie
Posts: 8
Joined: Mon Jun 15, 2020 9:30 pm

Re: Suddenly Unable to Register New Users

Post by AndrewL »

Thank you. I tried doing the var_dump as you said, and got a few different notices. The home page was exactly the same as before the var_dump, but when I clicked the first "register" link and it took me to the registration form, the same notifications from before were present, but below them were all of these new ones:

Notice: Only variables should be assigned by reference in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 1946

Notice: Undefined index: userid in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 1980

Notice: Undefined index: userid in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 1981

Notice: Undefined index: email in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 1998

Notice: Undefined index: email in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 1999

Notice: Undefined index: firstname in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2022

Notice: Undefined index: firstname in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2023

Notice: Undefined index: lastname in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2039

Notice: Undefined index: lastname in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2040

Notice: Undefined index: pwd in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2074

Notice: Undefined index: pwd in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2075

Notice: Undefined index: privacy in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2205

Notice: Undefined index: privacy in C:\inetpub\wwwroot\formalms\lib\lib.usermanager.php on line 2206
string(3545) " " (<-- between these quotation marks were the form inputs, as you can see in the screenshot below)


However, with the var_dump in the code, I can't click through to the next page. I've filled in the form with the same information, but clicking "register" now seems to do nothing. I've tried it a few times. There are still no error messages in the console.

I've attached the IIS log file; I changed it into a Word document so I could (a) add the line numbers easily and (b) attach it to this post.
Lines 1 through 13 are from me opening Forma and clicking through to the last registration page with no debugging and no var dump.
Lines 14 through 20 are from the same actions with debug set to true, but no var dump.
Lines 21 through 29 are with debug set to true and the var dump implemented, and clicking on the register button but not navigating to the last page.
Lines 30 and 31 appeared a few minutes after that.

I appreciate your help so far. I'm hoping you can still guide me a bit from here.
Attachments
var dump 1.png
log file june 29.docx
(14.04 KiB) Downloaded 42 times

Post Reply