mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #03054
[Bug 738265] Re: typo in lib/config-defaults.php
Scott,
Yeah I had another look and you're absolutely right, there are some
*serious* problems with these files.
I'm wondering, were you talking about the $cfg->log_file line or the
$cfg->emaillog line? Because it seems to me that there *is* a typo for
$cfg->emaillog in config-defaults.php and that it should probably say
// $cfg->emaillog = $CFG->dataroot . '/log/email.log';
But anyway, config-defaults clearly says at the top "If you see a setting in here you'd like to change, copy it to your
config.php and change it there", which is a lie in the case of the $cfg->log_file line as you discovered, because $CFG->dataroot is going to be undefined inside config.php.
Maybe that comment should be removed, and all the commented-out stuff in
config-defaults should instead go into config-dist.
Or maybe we could just add in a hacky comment above the $cfg->log_file
line to say you need to change $CFG to $cfg if you're moving it into
config.php.
In your case I guess if you're just wanting to change $cfg->log_file in config.php you need to reference $cfg->dataroot and obviously put it below the line where you set $cfg->dataroot. (I'm not familiar with $cfg->log_file and LOG_TARGET_FILE, I've always just let it all go to the apache log).
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/738265
Title:
typo in lib/config-defaults.php
Status in Mahara ePortfolio:
Invalid
Bug description:
I found a config file error (wrong case on the error log.. CFG-> vs
cfg->) which was copied over from lib/config-defaults.php -- so that's
a minor typo in your lib/config-defaults.php file with big
consequences; and thus another easy-to-fix bug.
Forum post with complete details: http://mahara.org/interaction/forum/topic.php?id=3110#post13442
References