error_reporting = E_ERROR display_errors = On 开了这2个然后service nginx restart 还是输出404啊,没有输出错误,我要去看日志?还是重启PHP?
[23-Jul-2014 08:33:51] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82 [23-Jul-2014 09:06:15] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82 [23-Jul-2014 10:05:53] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82 [23-Jul-2014 10:09:42] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82 [23-Jul-2014 10:22:08] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2 [23-Jul-2014 10:28:04] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2
PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82 $_SERVER['SCRIPT_NAME'] 不存在,不知道他们是怎么测试的! 在 入口文件开始处 $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF']; PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2 你没有设置时区,按他的提示设置一下就好了
应该也适用 thinkphp,你对比一下
server {
listen 80;
server_name www.phpno.com;
root /home/www/www_phpno_com/admin_wwwroot;
access_log off;
error_page 404 /404.html;
location /404.html {
root /home/www/www_phpno_com/admin_wwwroot;
}
location /{
index index.html index.htm index.php;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ .+\.php($|/) {
root /home/www/www_phpno_com/admin_wwwroot;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /home/www/www_phpno_com/admin_wwwroot/$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
}
2、打开 php 的错误显示功能,看看是否有错误信息输出
3、据说较高版本的 preg_replace_callback 存在严重内存泄露问题,而 thinkphp3.2 恰恰要用到
你不肯打开错误显示功能,那如何能知道问题出在哪里?
就算是算命,不也要你的生辰八字吗?
rewrite ^/subdir/(.*)$ /subdir/index.php/$1;
归神 我改了这行 现在500 变成404了 = =
不就看到 php.ini 在哪里了吗
display_errors = On
开了这2个然后service nginx restart
还是输出404啊,没有输出错误,我要去看日志?还是重启PHP?
[23-Jul-2014 08:33:51] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82
[23-Jul-2014 09:06:15] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82
[23-Jul-2014 10:05:53] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82
[23-Jul-2014 10:09:42] PHP Notice: Undefined index: SCRIPT_NAME in /usr/local/www/erp/ThinkPHP/ThinkPHP.php on line 82
[23-Jul-2014 10:22:08] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2
[23-Jul-2014 10:28:04] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2
$_SERVER['SCRIPT_NAME'] 不存在,不知道他们是怎么测试的!
在 入口文件开始处
$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF']; PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/www/web/dolanne/go/info.php on line 2
你没有设置时区,按他的提示设置一下就好了
不是进步而是退步!
404 是找不到目标页,显然是你重写指错了地方
500 是被执行的程序出现了问题,而又未能返回错误信息。于是 nginx 就发 500错,表示应用程序拒绝响应
现在回到发帖的时候状态了 php日志还是上面那些,nignx日志就是发帖0楼的那些,肿么办