=== DIAGNOSTIC SCRIPT START === Current time: 2025-12-09 22:24:16 Current directory: /var/www/html/smartfarm Script file: /var/www/html/smartfarm/diagnostic.php Script directory: /var/www/html/smartfarm === TEST 1: Basic File Write === Attempting to write to: /var/www/html/smartfarm/diagnostic_test.log ✅ SUCCESS: Wrote 38 bytes to file File exists: YES File contents: 2025-12-09 22:24:16 - Diagnostic test === TEST 2: GET Parameters === Query string: GET parameters: No GET parameters found Try: diagnostic.php?temperature=23.5&battery=3.7 === TEST 3: Database Connection === Attempting connection to: 10.10.10.101 ✅ SUCCESS: Connected to database Server info: 5.7.42-0ubuntu0.18.04.1 ✅ SUCCESS: Can access temperature_logs table Table structure: id (int(11)) time (varchar(50)) temperature (float) temp_bme (float) hum (float) nv1_hum (int(11)) nv2_hum (int(11)) nv3_hum (int(11)) pression (float) resgas (float) longitude (float) latitude (float) battery (float) === TEST 4: PHP Configuration === Error reporting: 22527 Display errors: OFF Log errors: ON Error log: default Memory limit: 128M Max execution time: 30 === TEST 5: Directory Permissions === Directory: /var/www/html/smartfarm Readable: YES Writable: YES Permissions: 0755 === TEST 6: Force Error Test === Attempting to trigger an error... Error triggered === DIAGNOSTIC SCRIPT END === Cleaned up test file