mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #03642
[Bug 778272] Re: if log_environ is called during install, then initial password isn't prompted for
Had more of a look at it
The user is created, default password is 'mahara'. When you log in, it
will prompt for change in password
A few things to note:
- if wwwroot is set works fine, with errors showing magic is enabled
- if the log_environ line complaining about magic_quotes in lib/mahara.php:98 is commented, it works fine
- if there are random other log_environs during and after install (ie when entering the get method of user), it still works fine as long as the magic_quotes error is disabled (or magic quotes is disabled.
- if you comment out log_environ in lib/mahara.php:98 and put a random log_environ in
- if magic_quotes is disabled due to htaccess file then it works fine
I tried a bit more log_environs in places. It seems to have the bug when
a log_environ is placed before init.php:153, the call to load_config(),
and NOT have the bug when placed after. Me thinks that this may have a
problem.
I tried adding a log_environ in the foreach loop of the config values.
if (isset($CFG->wwwroot)) log_environ('test');
This outputs lots of errors, but goes to password change after.
If I try this line instead
if ($cfg->field == 'wwwroot') log_environ('test');
Then it will display the error, and NOT display the password change after.
So the bug is not having a wwwroot set in config.php (can't have it in database if errors are going to be written)
This also occurs if in the config the trailing slash isn't present.
It also occurs if the value in config is incorrect.
(the last two are the problem of the administrator).
This could be fixed by either NOT printing errors before config is
loaded from database, or by setting the default wwwroot after the config
is loaded from FILE.
Ideas?
Cheers,
Hugh
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/778272
Title:
if log_environ is called during install, then initial password isn't
prompted for
Status in Mahara ePortfolio:
New
Bug description:
During the install process the message below is given. The page
directly after the install (where it usually asks for the initial
password) is skipped, and goes straight to dashboard (with the same
error message). No way to set the admin password.
[ENV] 57 You have dangerous PHP settings, magic_quotes_gpc is on. Mahara is trying to work around this, but you should really fix it
Call stack (most recent first):
log_message("You have dangerous PHP settings, magic_quotes_gpc ...", 1, true, true) at /var/www/mahara-test/lib/errors.php:121
log_environ("You have dangerous PHP settings, magic_quotes_gpc ...") at /var/www/mahara-test/lib/mahara.php:98
ensure_sanity() at /var/www/mahara-test/init.php:82
require("/var/www/mahara-test/init.php") at /var/www/mahara-test/admin/upgrade.php:32
Interestingly, if $cfg->wwwroot is set, the errors are still there,
but it asks for password as usual
References