Forums | Mahara Community
Support
/
Sorry, your registration attempt was unsuccessful. This is our fault, not yours. Please try again later
21 November 2020, 3:08
Hi, we have a problem when we try to register a user. This message appears:
"Sorry, your registration attempt was unsuccessful. This is our fault, not yours. Please try again later."
We don't have any smtp server configured. Since we send from Mahara system.
When the error appears, it creates a large report in the logs.
------------------
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] [WAR] af (auth/lib.php:3211) ), referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] [WAR] af (auth/lib.php:3211) , referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] Call stack (most recent first):, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * log_message(object(SQLException), integer, true, true) at /disc2/www/html/lib/errors.php:95, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * log_warn(object(SQLException)) at /disc2/www/html/auth/lib.php:3211, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * auth_register_submit(object(Pieform), array(size 15)) at /disc2/www/html/lib/pieforms/pieform.php:568, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * Pieform->__construct(array(size 11)) at /disc2/www/html/lib/mahara.php:5445, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * pieform_instance(array(size 11)) at /disc2/www/html/auth/lib.php:2881, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] * auth_generate_registration_form_js(array(size 11), array(size 1)) at /disc2/www/html/register.php:212, referer: https://portafolis.uvic.cat/register.php
[Fri Nov 20 12:20:10 2020] [notice] [client 192.168.222.8] , referer: https://portafolis.uvic.cat/register.php
------------------
Tell me something please.
25 November 2020, 10:59
Hi Joan,
From the output you've posted there looks to be a problem in the htdocs/auth/lib.ph file around the lines 3139 or 3142 where it tries saving data to the database.
Can I get you to add just before the insert_record() and update_record() lines the line: log_debug($values);
And then try replicating the problem again and see if there is some problem with what the $values are set to
Cheers
Robert
25 November 2020, 20:31
Hi Robert,
I applied your answer.
if (!record_exists('usr_registration', 'email', $values['email'])) {
insert_record('usr_registration', $values);
log_debug($values);
}
else {
update_record('usr_registration', $values, array('email' => $values['email']));
log_debug($values);
}
I don't know what I can do.
But the logs are very extensive. Here is the last part:
-----------------------------------------------------------------------------
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [value] => /register.php, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [spa m] => Array, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) (, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [secret] => R1yi6WH49YqedxEB, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [mintime] => 5, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [hash] => Array, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) (, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [0] => firstname, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [1] => lastname, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [2] => email, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [3] => institution, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [4] => reason, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [5] => submit, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [plu gintype] => core, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [plu ginname] => register, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), refer er: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [1] => Array , referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) (, refer er: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [uvi cprova] => , referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [ble arnautonomyplatform] => 1, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), refer er: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: http s://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://port afolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.u vic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) [previous:Exception:private] => , re ferer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) ), referer: https://portafolis.uvic.cat/ register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] [WAR] 18 (auth/lib.php:3213) , referer: https://portafolis.uvic.cat/r egister.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] Call stack (most recent first):, referer: https://portafolis.uvic.cat /register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * log_message(object(SQLException), integer, true, true) at /disc2/ www/html/lib/errors.php:95, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * log_warn(object(SQLException)) at /disc2/www/html/auth/lib.php:32 13, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * auth_register_submit(object(Pieform), array(size 16)) at /disc2/w ww/html/lib/pieforms/pieform.php:568, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * Pieform->__construct(array(size 11)) at /disc2/www/html/lib/mahar a.php:5445, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * pieform_instance(array(size 11)) at /disc2/www/html/auth/lib.php: 2881, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] * auth_generate_registration_form_js(array(size 11), array(size 2)) at /disc2/www/html/register.php:212, referer: https://portafolis.uvic.cat/register.php
[Wed Nov 25 08:20:27 2020] [notice] [client 192.168.222.8] , referer: https://portafolis.uvic.cat/register.php
-----------------------------------------------------------------
Tell me something please.
26 November 2020, 9:15
Hi Joan,
From looking at that output it seems as though the $values parameter is actually containing the information that the $form parameter should contain.
The function that you made the change within should be:
function auth_register_submit(Pieform $form, $values) { ... }
are the $form and $values parameters in that order?
Cheers
Robert
26 November 2020, 20:07
Hi Robert,
The function is like this:
function auth_register_submit(Pieform $form, $values) {
global $SESSION;
safe_require('auth', 'internal');
// We need to sanitize the $values to avoid hacking vectors
// There should not be any HTML/JS in the fields so we clean it with htmlpurifier
// Then remove even the safe html tags
foreach ($values as $key => $value) {
$values[$key] = strip_tags(clean_html($value));
}
What else I can do to fix it?
Thanks.
26 November 2020, 23:32
This is the first part of the error_log:
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] [WAR] ac (lib/errors.php:859) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1] in EXECUTE("SELECT "username" FROM "usr" WHERE "id" = ? ")Command was: SELECT "username" FROM "usr" WHERE "id" = ? , referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] Call stack (most recent first):, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * log_message(string(size 314), integer, true, true) at /disc2/www/html/lib/errors.php:95, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * log_warn(string(size 314)) at /disc2/www/html/lib/errors.php:859, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * SQLException->__construct(string(size 314)) at /disc2/www/html/lib/dml.php:540, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * get_recordset_sql(string(size 45), false) at /disc2/www/html/lib/dml.php:865, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * get_field_sql(string(size 45), array(size 0)) at /disc2/www/html/lib/dml.php:853, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * get_field(string(size 3), string(size 8), string(size 2), null) at /disc2/www/html/lib/user.php:1351, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * display_username(object(stdClass)) at /disc2/www/html/lib/user.php:1184, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * display_name(object(stdClass), object(stdClass)) at /disc2/www/html/lib/user.php:860, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * email_user(object(stdClass), null, string(size 42), string(size 301), string(size 420)) at /disc2/www/html/auth/lib.php:3203, referer: https://portafolis.uvic.cat/register.php
[Thu Nov 26 11:17:18 2020] [notice] [client 192.168.222.8] * auth_register_submit(object(Pieform), array(size 16)) at /disc2/www/html/lib/pieforms/pieform.php:568, referer: https://portafolis.uvic.cat/register.php
....
Despite my mistake, I can see how the registered user wrote to phpmyadmin.
28 November 2020, 18:27
Hi Joan,
Do you run into the problem as well when you do have the SMTP server configured? Not configuring it impacts all sorts of messages. Not everything goes via the Mahara inbox. If you don't want your students to receive email notifications you could change every account over to 'Disable email'. That would be 'cleaner' in my opinion yet still allow those messages through that need to be delivered and prevent error messages piling up in the site administrator account alerting to the fact that email is not configured.
Cheers
Kristina
30 November 2020, 21:18
We don't have any smpt configured. We’ve always worked that way.
In the first part of the error_log, we have this error_message:
Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1] in EXECUTE("SELECT "username" FROM "usr" WHERE "id" = ? ")Command was: SELECT "username" FROM "usr" WHERE "id" = ? , referer: https://portafolis.uvic.cat/register.php
- «Previous page
- 1
- 2
- »Next page