Crea un log in cui registri tutte le operazioni svolte e -soprattutto- warning, errori ed eccezioni.
Per gli errori puoi provare
Codice PHP:
ini_set('log_errors', TRUE);
ini_set('error_log', 'your/path/to/errors.log');
per le eccezioni basta un unico try/catch temporaneo attorno all'intero codice:
Codice PHP:
try {
...
}
catch(Exception $e) {
error_log($e->getMessage(), 3, 'your/path/to/errors.log');
}
Sarebbe più carino registrando un exception handler, ma per un test rapido può essere sufficiente così.