error_log("PostfixAdmin: configured to use $mechanism, but asked to crypt password using {$method_in_hash}; are you migrating algorithm/mechanism or is something wrong?");
$mechanism=$method_in_hash;
@ -1742,7 +1742,7 @@ function db_connect()
$username_password=false;
}elseif(db_pgsql()){
// nothing to do.
// nothing to do.
}else{
thrownewException("<p style='color: red'>FATAL Error:<br />Invalid \$CONF['database_type']! Please fix your config.inc.php!</p>");
echo$todo." You need to have a setup_pasword hash configured in a <code>config.local.php</code> file";
}
?>
?>
</li>
<li>
<?php
if($authenticated){
echo$tick." You are logged in with the setup_password, some environment and hosting checks are displayed below.";
}else{
echo$todo." You need to authenticate using the setup_password before you can perform some environment and hosting checks.";
}
?>
if($authenticated){
echo$tick." You are logged in with the setup_password, some environment and hosting checks are displayed below.";
}else{
echo$todo." You need to authenticate using the setup_password before you can perform some environment and hosting checks.";
}
?>
</li>
</ul>
@ -289,42 +289,42 @@ EOF;
<?php
$check=do_software_environment_check();
if($authenticated){
if(!empty($check['info'])){
echo"<h3>Information</h3><ul>";
foreach($check['info']as$msg){
echo"<li>{$tick}{$msg}</li>";
}
echo"</ul>";
}
if($authenticated){
if(!empty($check['info'])){
echo"<h3>Information</h3><ul>";
foreach($check['info']as$msg){
echo"<li>{$tick}{$msg}</li>";
}
echo"</ul>";
}
if(!empty($check['warn'])){
echo"<h3>Warnings</h3><ul>";
foreach($check['warn']as$msg){
echo"<li class='text-warning'>⚠ {$msg}</li>";
}
echo"</ul>";
}
if(!empty($check['error'])){
echo"<h3>Errors (MUST be fixed)</h3><ul>";
foreach($check['error']as$msg){
echo"<li class='text-danger'>⛔{$msg}</li>";
}
echo"</ul>";
}
if(!empty($check['warn'])){
echo"<h3>Warnings</h3><ul>";
foreach($check['warn']as$msg){
echo"<li class='text-warning'>⚠ {$msg}</li>";
}
echo"</ul>";
}
if(!empty($check['error'])){
echo"<h3>Errors (MUST be fixed)</h3><ul>";
foreach($check['error']as$msg){
echo"<li class='text-danger'>⛔{$msg}</li>";
}
echo"</ul>";
}
$php_error_log=ini_get('error_log');
}else{
if(!empty($check['error'])){
echo'<h3 class="text-danger">Hosting Environment errors found. Login to see details.</h3>';
}
$php_error_log=ini_get('error_log');
}else{
if(!empty($check['error'])){
echo'<h3 class="text-danger">Hosting Environment errors found. Login to see details.</h3>';
}
if(!empty($check['warn'])){
echo'<h3 class="text-warning">Hosting Environment warnings found. Login to see details.</h3>';
}
}
if(!empty($check['warn'])){
echo'<h3 class="text-warning">Hosting Environment warnings found. Login to see details.</h3>';
}
}
?>
?>
</div>
</div>
@ -334,29 +334,29 @@ EOF;
<h2class="h2">DatabaseUpdate</h2>
<?php
$db=false;
try{
$db=db_connect();
}catch(\Exception$e){
echo"<p class='h3 text-danger'>Something went wrong while trying to connect to the database. A message should be logged - check PHP's error_log (".ini_get('error_log').')</p>\n';
error_log("Couldn't perform PostfixAdmin database update - failed to connect to db? ".$e->getMessage()." Trace: ".$e->getTraceAsString());
}
$db=false;
try{
$db=db_connect();
}catch(\Exception$e){
echo"<p class='h3 text-danger'>Something went wrong while trying to connect to the database. A message should be logged - check PHP's error_log (".ini_get('error_log').')</p>\n';
error_log("Couldn't perform PostfixAdmin database update - failed to connect to db? ".$e->getMessage()." Trace: ".$e->getTraceAsString());
}
if($db){
echo"<p>Everything seems fine... attempting to create/update database structure</p>\n";
echo"<p class='h3 text-danger'>Something went wrong while trying to apply database updates, a message should be logged - check PHP's error_log (".ini_get('error_log').')</p>\n';
echo"<p class='h3 text-danger'>Something went wrong while trying to apply database updates, a message should be logged - check PHP's error_log (".ini_get('error_log').')</p>\n';