• [solution]xdebug正确配置,但不显示错误信息


    一开始以为是配置问题,其实不是,折腾了好久,貌似中文网页很少有人提到这事,更别提解决之道!

    最好还是用英文关键词google之:得如下网页

    https://bugs.launchpad.net/ubuntu/+source/xdebug/+bug/1096464

    xdebug does not display errors by default

    Bug Description

    Expected behavior:
    Xdebug, when installed, should display detailed error information in the browser window.

    Actual behavior:
    No error details are displayed. Instead, the web server returns a 500 Internal Server Error.

    Details:
    The default PHP5 Apache configuration located at /etc/php5/apache2/php.ini has display_errors turned off by default. This makes sense because exposing these errors is a security risk in a production environment. This can easily be changed manually by the administrator. However, Xdebug is a tool for debugging, not for production, and its installation by the administrator implies a development/debugging environment, not production. The xdebug package should enable display_errors when it is installed.

    This can be done by adding a single line to the package file installed to /etc/php5/mods-available/xdebug.ini:
    display_errors = On

    Upon installation, the above config file is installed into PHP's mods-available directory, and it is also symlinked to /etc/php5/conf.d/20-xdebug.ini. Thus, the configuration is loaded after php.ini and the second occurrence of display_errors overrides the first.

    This simple change will allow xdebug to work as expected out-of-the-box.

    最后手动到php.ini处修改display_errors = On

  • 相关阅读:
    Python Scarpy安装包
    pip install 出现报asciii码错误的问题
    pyhton 27 pip命令无法使用 没有Scripts文件夹 的解决方法
    北漂
    15再见,16你好。
    selenium By.xpath 用法
    java.util.NoSuchElementException解决办法
    Android版之数据库增删改查图书信息
    Android studio连接sqlserver数据库
    Android简易版图书管理系统
  • 原文地址:https://www.cnblogs.com/nbalive2001/p/3421537.html
Copyright © 2020-2023  润新知