美文网首页
appserv: php加载apache显示500

appserv: php加载apache显示500

作者: 一书文集 | 来源:发表于2019-12-23 17:35 被阅读0次

修改方式要注意:
希望有相关问题的人能搜到!
https://stackoverflow.com/questions/4731364/internal-error-500-apache-but-nothing-in-the-logs
Locate your php.ini file:

el@apollo:~$ locate php.ini
/etc/php5/apache2/php.ini
Edit that file as root:

sudo vi /etc/php5/apache2/php.ini
Find this line in php.ini:

display_errors = Off
Change the above line to this:

display_errors = On
Lower down in the file you'll see this:

;display_startup_errors
; Default Value: Off
; Development Value: On
; Production Value: Off

;error_reporting
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
The semicolons are comments, that means the lines don't take effect. Change those lines so they look like this:

display_startup_errors = On
; Default Value: Off
; Development Value: On
; Production Value: Off

error_reporting = E_ALL
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
What this communicates to PHP is that we want to log all these errors. Warning, there will be a large performance hit, so you don't want this enabled on production because logging takes work and work takes time, time costs money.

Restarting PHP and Apache should apply the change.

Do what you did to cause the 500 Internal Server error again, and check the log:

vi /var/log/apache2/error.log
You should see the 500 error at the end, something like this:

[Wed Dec 11 01:00:40 2013] [error] [client 192.168.11.11] PHP Fatal error:
Call to undefined function Foobar\byob\penguin\alert() in /yourproject/
your_src/symfony/Controller/MessedUpController.php on line 249, referer:
https://nuclearreactor.com/abouttoblowup

相关文章

  • appserv: php加载apache显示500

    修改方式要注意:希望有相关问题的人能搜到!https://stackoverflow.com/questions/...

  • mvc开发环境的搭建步骤

    安装Appserv8.6,包含了apache,mysql,php Appserv会顺带安装visio C++ 升级...

  • appserv

    一、appserv是 PHP 网页架站工具组合包,所包含的软件有:Apache、Apache Monitor、PH...

  • SQL注入基础

    MySQL 通过AppServ/wamp/xampp可以在windows系统中快速搭建出一个Apache+PHP+...

  • Windows环境为php7.1增加redis扩展

    最近在学习redis,机器环境是appserv8.6.0,包括apache24, php7.1, mysql5.7...

  • AppServ 的安装与配置

    AppServ 是一个软件集合,包括Apache(HTTP 服务器软件)、PHP(网页程序设计语言)、MySQL(...

  • 2019-07-19

    今天学习了Apache加载PHP

  • 五、优化

    加载PHP配置文件 方法:1、更改apache的配置,告诉Apache到指定的地方加载php.ini文件在http...

  • 转:PHP的安装和配置

    原文地址:PHP开发环境 AppServ 2.5.10 安装及修改 appserv下载地址:http://www....

  • Apache服务器

    1. PHP开启压缩 2. 隐藏 Apache 和 PHP 版本号 3. 配置HTTPS 确认 apache 加载...

网友评论

      本文标题:appserv: php加载apache显示500

      本文链接:https://www.haomeiwen.com/subject/egqtoctx.html