added error logging
This commit is contained in:
11
webapp/.htaccess
Normal file
11
webapp/.htaccess
Normal file
@@ -0,0 +1,11 @@
|
||||
# Protect sensitive files from direct web access
|
||||
<FilesMatch "\.(log|sql|env)$">
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Protect error.log specifically
|
||||
<Files "error.log">
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</Files>
|
||||
@@ -7,6 +7,11 @@
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '0');
|
||||
|
||||
// Configure error logging to local file
|
||||
$errorLogPath = __DIR__ . '/error.log';
|
||||
ini_set('log_errors', '1');
|
||||
ini_set('error_log', $errorLogPath);
|
||||
|
||||
// Database configuration
|
||||
define('DB_HOST', getenv('DB_HOST') ?: 'localhost');
|
||||
define('DB_NAME', getenv('DB_NAME') ?: 'geofeed_manager');
|
||||
|
||||
2
webapp/error.log
Normal file
2
webapp/error.log
Normal file
@@ -0,0 +1,2 @@
|
||||
# PHP Error Log for Geofeed Manager
|
||||
# Created at 2025-01-17
|
||||
Reference in New Issue
Block a user