Visualizzazione dei risultati da 1 a 1 su 1
  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    142

    Stack trace assente in error.log

    codice:
    $ php -i | grep log_errors
    log_errors => On => On
    log_errors_max_len => 1024 => 1024
    $ php -i | grep error_log
    error_log => /var/log/error.log => /var/log/error.log
    $ php -i | grep display_errors
    display_errors => Off => Off
    $ cat test.php 
    <?php
    trigger_error(null);
    throw new Exception;
    $ php test.php 
    $ tail -n 5 /var/log/error.log 
    [26-Apr-2022 09:06:52 Europe/Berlin] PHP Notice:   in /tmp/tmp.FoceFGDBYx/test.php on line 2
    [26-Apr-2022 09:06:52 Europe/Berlin] PHP Fatal error:  Uncaught Exception in /tmp/tmp.FoceFGDBYx/test.php:3
    Stack trace:
    #0 {main}
      thrown in /tmp/tmp.FoceFGDBYx/test.php on line 3
    Come vedete per la Notice non c'è lo stack trace, mentre per il Fatal error si.
    Perchè?
    Ultima modifica di astros3; 26-04-2022 a 09:35

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.