Modify

Opened 11 years ago

Last modified 8 years ago

#357 new Bug/Fehler

xtc_db_error.inc.php

Reported by: Volker Strähle Owned by: somebody
Priority: normal Milestone:
Component: Admin Version: 2.0.1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Fehler kann nicht an Admin gemailt werden, wenn aufgrund des Fehlers keine Verbindung zur Datenbank möglich ist, da die Konfigdaten aufgrund fehlender Verbindung zu DB nicht aus der DB gelesen werden können.

Mögliche Lösung:
In /admin/configuration.php beim Speichern der Konfig eine current_config.php als Backup erstellen und im Fehlerfall diese einbinden.

// Save Config to file - 2015-01-23, webald
	chmod(DIR_FS_DOCUMENT_ROOT.'/includes/current_config.php',0644);
	unlink(DIR_FS_DOCUMENT_ROOT.'/includes/current_config.php');
	$fp=fopen(DIR_FS_DOCUMENT_ROOT.'/includes/current_config.php','a');
	$configuration_query = xtc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from '.TABLE_CONFIGURATION);
	while ($configuration = xtc_db_fetch_array($configuration_query)) {
	  fwrite($fp,"define(".$configuration['cfgKey'].", ".stripslashes($configuration['cfgValue']).")");
	  fwrite($fp,"\r\n");
	}
	fclose($fp);
	chmod(DIR_FS_DOCUMENT_ROOT.'/includes/current_config.php',0444);

Attachments (0)

Change History (3)

comment:2 by Gerhard Waldemair, 11 years ago

Milestone: modified-shop-2.00modified-shop-2.10
Version: 1.062.10

comment:3 by Torsten Riemer, 8 years ago

Milestone: modified-shop-2.1.0.0

Modify Ticket

Action
as new The owner will remain somebody.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.