nginx 报错 HTTP ERROR 500 (PHP数组简写模式)
同样的代码放在Apache上执行可以执行,在nginx上面就报错了。
百度出来一堆结果貌似都不对,然后只有注释代码->运行程序,一步步找到问题所在
$buffer = []; 这一步报错了
原来是PHP版本问题,PHP数组简写模式是从5.4才开始有的,我wamp上面PHP版本是5.5的、lnmp上边是5.3的。
// 原来的数组写法
$arr = array("key" => "value", "key2" => "value2");
// 简写形式
$arr = ["key" => "value", "key2" => "value2"];

点击此处链接了解更多关于PHP版本的变化 PHP 5.2、5.3、5.4、5.5、5.6 对比以及功能详解
nginx其他错误参考链接 Nginx Http 500错误解决 (转载)
nginx 报错 HTTP ERROR 500 (PHP数组简写模式)的更多相关文章
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
- webSphere 部署项目时,访问报错:Error 500: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet【我】
前提: 一个普通maven项目,在本地用Tomcat运行没有任何问题,但是放到 webSphere 测试环境上,访问时就报如下错误: Error 500: javax.servlet.Servlet ...
- CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. yum install gcc gc ...
- Linux安装Nginx报错: ./configure: error: C compiler cc is not found
CentOS 7.3 下 安装 Nginx 执行配置命令 ./configure 时提示以下错误: checking for OS + Linux 2.6.32-431.el6.x86_64 x86_ ...
- nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403
遇到nginx报错:websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403 serv ...
- [nginx报错问题]reload时报错:nginx: [error] invalid PID number "" in ...
错误 第一次探索nginx,执行以下命令时: nginx -s reload 报出错误: nginx: [error] invalid PID number "" in ... * ...
- nginx 报错Malformed HTTP request line, git 报错fatal: git-write-tree: error building trees
nginx 报错由于url里有空格,包括url本身或者参数有空格 git 报错是因为解决冲突的时候没有add,即没有merge
- eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context was:(...”
eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context ...
- nginx报错
1. nginx报错 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid&q ...
随机推荐
- Session 失效原因
转载http://blog.csdn.net/LLorJJ999/article/details/4107464 昨天去GTSC面试,有面试官问我关于Session丢失之后怎么查的问题,说老实话,开发 ...
- 下一代Asp.net开发规范OWIN(1)—— OWIN产生的背景以及简单介绍
随着VS2013的发布,微软在Asp.Net中引入了很多新的特性,比如使用新的权限验证模块Identity, 使用Async来提高Web服务器的吞吐量和效率等.其中一个不得不提的是OWIN和Katan ...
- ORA-06502:PL/SQL :numberic or value error: character string buffer too small
今天遇到一个错误提示:ORA-06502:PL/SQL :numberic or value error: character string buffer too small,一般对应的中文信息为:O ...
- Microsoft SQL Server 2005 Service fails to start
今天碰到一雷死人的事情,在Windows Server 2012 R2上安装SQL SERVER 2005标准版过程中一直遇到"The SQL Server service failed t ...
- backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.
昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示: <Exec> <ctx>yMaint.ShrinkLog</ctx> ...
- Android:开发环境搭建相关问题
1.Android.ADT.SDK概念与关系 SDK:Software Development Kit,中文意思是“软件开发工具包”.这是一个覆盖面相当广泛的名词,可以这么说:辅助开发某一类软件的相关 ...
- 烂泥:Postfix邮件服务器搭建之准备工作
说实话,Postfix邮件服务器的搭建是一件很麻烦的事情,需要各种软件之间的配置和调试.在写这篇文章之前,我也是搭建测试了不下于10次才算把整个流程给走通,今天刚好有时间把整个搭建过程记录下来. 在正 ...
- Fragment调用Activity
public void onClick(View arg0) { Intent intent = new Intent(); intent ...
- HTTPS----安全超文本传输协议
HTTPS协议详解HTTPS以保密为目标研发,简单讲是HTTP的安全版.其安全基础是SSL协议,因此加密的详细内容请看SSL.全称Hypertext Transfer Protocol over Se ...
- POJ2985 The k-th Largest Group[树状数组求第k大值+并查集||treap+并查集]
The k-th Largest Group Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 8807 Accepted ...