<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$file = __DIR__ . '/debug_pix.log';
echo "Trying to write to $file...<br>";
if (file_put_contents($file, "Test write from test.php " . date('Y-m-d H:i:s') . "\n", FILE_APPEND)) {
    echo "Success! Check the file.";
} else {
    echo "Failed to write. Check permissions.";
    echo "<br>Last error: " . print_r(error_get_last(), true);
}
