久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網
      最全最豐富的資訊網站

      如何輸出php錯誤日志

      輸出php錯誤日志的方法:1、修改php-fpm.conf中的catch_workers_output和error_log配置;2、修改php.ini配置文件;3、重啟php-fpm。

      如何輸出php錯誤日志

      本文操作環(huán)境:windows10系統(tǒng)、php 7&&nginx 1.14、thinkpad t480電腦。

      我們都知道nginx是一個web服務器,因此nginx的access日志只有對訪問頁面的記錄,而不會有php 的 error log信息。nginx把對php的請求發(fā)給php-fpm fastcgi進程來處理,默認的php-fpm只會輸出php-fpm的錯誤信息,在php-fpm的errors log里也看不到php的errorlog。

      出現(xiàn)這種情況的原因是php-fpm的配置文件php-fpm.conf中默認是關閉worker進程的錯誤輸出的,并且直接把他們重定向到/dev/null,所以我們在nginx的error log 和php-fpm的errorlog都看不到php的錯誤日志。

      但是這樣的話我們調試起來就會很痛苦,那么我們該如何解決這個問題呢?下面就讓我們一起來看看吧!

      1、修改php-fpm.conf中配置 沒有則增加

      catch_workers_output = yes error_log = log/error_log

      2、修改php.ini中配置,沒有則增加

      log_errors = On error_log = "/usr/local/lnmp/php/var/log/error_log" error_reporting=E_ALL&~E_NOTICE

      3、重啟php-fpm

      當PHP執(zhí)行錯誤時就能看到錯誤日志在"/usr/local/lnmp/php/var/log/error_log"中了。

      推薦學習:php培訓

      贊(0)
      分享到: 更多 (0)
      網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號