gouchaoer
V2EX  ›  问与答

php 的 error_log 问题

  •  
  •   gouchaoer · Oct 26, 2016 · 2054 views
    This topic created in 3530 days ago, the information mentioned may be changed or developed.
    我在 php-fpm 下跑 php7.0 ,然后 phpinfo 关键字段如下:
    ```
    Directive Local Value Master Value
    error_log /app/common/runtime/php_errors.log /app/common/runtime/php_errors.log
    error_prepend_string no value no value
    error_reporting 32767 32767
    ```
    然后我在 php 脚本中直接调用 error_log 来 log 一个字符串就能在 /app/common/runtime/php_errors.log 下面看到。但是我如果故意把 php 脚本写错,就不能看到 log 了,这是为啥呢?
    Supplement 1  ·  Oct 26, 2016
    已经解决了,我 sb 了,有个 log_errors 选项默认没开,这个选项对应 display_error
    1 replies    2016-10-26 15:48:26 +08:00
    daniellu
        1
    daniellu  
       Oct 26, 2016   ❤️ 1
    确认一下你的 php.ini 中 error 相关的设置。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5372 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 08:37 · PVG 16:37 · LAX 01:37 · JFK 04:37
    ♥ Do have faith in what you're doing.