行走的小布鞋 发表于 2014-06-09 19:11

各位大侠,为什么我的php网页显示不了报错500

大家好,我的系统环境是这样的
OS:linux redhat 6.4 x86_64
php: 5.5.7
apache:httpd-2.4.9
mysql:5.6.17

我的目的是部署cacti监控程序,cacti其实就是一个web页面程序

我将cacti程序部署在:/usr/local/apache2/htdocs/ 下面,目录位cacti

通过网页,访问 http://192.168.137.129/cacti/index.php 就报错 500

但是,我通过网页访问 http://192.168.137.129/cacti/index1.php,则正常

index1.php 的代码如下<?php
phpinfo();
?>logs/access.log

只有这样的提示192.168.137.1 - - "GET /cacti/index.php HTTP/1.1" 500 -
192.168.137.1 - - "GET /cacti/index.php HTTP/1.1" 200 60899
192.168.137.1 - - "GET /favicon.ico HTTP/1.1" 404 209
127.0.0.1 - - "GET / HTTP/1.0" 200 44
192.168.137.1 - - "GET /cacti/index.php HTTP/1.1" 500 -
127.0.0.1 - - "GET / HTTP/1.0" 200 44
192.168.137.1 - - "GET /cacti/index.php HTTP/1.1" 500 -
127.0.0.1 - - "GET / HTTP/1.0" 200 44非常苦闷,大侠帮忙看看???????谢谢啦

bs 发表于 2014-06-16 18:34

error_reporting(E_ALL);
ini_set("display_errors", 1);

systybj 发表于 2014-07-03 13:57

500
与数据库相关的错误提示

yangsf5 发表于 2014-07-23 21:41

你这是access.log,你得看error.log

ogusu 发表于 2014-07-31 09:43

看的log文件好像不对。

方法一)从页面上直接查看错误信息
1. php.ini里设置display_errors = On,重启Apache
2. 在php代码中加ini_set( 'display_errors', 1 );

方法二)从log文件中查看
在php.ini里设置
log_errors=on
error_log="/路径/php_error.log"
重启Apache

howge 发表于 2014-11-20 17:01

500 错误一般都是自己web服务器有问题
页: [1]
查看完整版本: 各位大侠,为什么我的php网页显示不了报错500