Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: How do I get PHP errors to display? #10161
    blanknvrm
    Participant

    In Unix CLI, it’s very practical to redirect only errors to a file:

    ./script 2> errors.log
    

    From your script, either use var_dump() or equivalent as usual (both STDOUT and STDERR will receive the output), but to write only in the log file:

    fwrite(STDERR, "Debug infos\n"); // Write in errors.log^
    

    Then from another shell, for live changes:

    tail -f errors.log
    

    or simply

    watch cat errors.log
    
Viewing 1 post (of 1 total)