added error logging

This commit is contained in:
Purple
2026-01-17 22:50:18 +00:00
parent 678ae9b5dd
commit 0ba17fe94f
3 changed files with 18 additions and 0 deletions

11
webapp/.htaccess Normal file
View 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>

View File

@@ -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
View File

@@ -0,0 +1,2 @@
# PHP Error Log for Geofeed Manager
# Created at 2025-01-17