Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
880a6f6b
Commit
880a6f6b
authored
Mar 01, 2006
by
moodler
Browse files
Added a new config variable that will mail db connection errors to someone (eg admin)
parent
567709c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
880a6f6b
...
...
@@ -274,6 +274,12 @@ $CFG->admin = 'admin';
// If you are going to publish your log, or the output of your web stats analyzer
// this will weaken the security of your website.
//
// Email database connection errors to someone. If Moodle cannot connect to the
// database, then email this address with a notice.
//
// $CFG->emailconnectionerrors = your@emailaddress.com;
//
//
// NOTE: if you are using custompix in your theme, see /fixpix.php.
//=========================================================================
...
...
lib/setup.php
View file @
880a6f6b
...
...
@@ -140,6 +140,12 @@ global $HTTPSPAGEREQUIRED;
echo
'<p>The site administrator should also check that the database details have been correctly specified in config.php</p>'
;
echo
'</td></tr></table>'
;
echo
'</body></html>'
;
if
(
!
empty
(
$CFG
->
emailconnectionerrorsto
))
{
mail
(
$CFG
->
emailconnectionerrorsto
,
'WARNING: Database connection error: '
.
$CFG
->
wwwroot
,
'Connection error: '
.
$CFG
->
wwwroot
);
}
die
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment