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 ...
随机推荐
- 好用的第三方控件,Xcode插件(不断更新)
第三方控件类: 1.提示框 MBProgressHUD: 是一款非常强大的.提供多种样式的提示框.使用起来简单.方便.可以在GitHub上查看具体的使用方法. https://github.com ...
- iOS--UICollectionView(滚动视图)入门
UICollectionView @interface UICollectionView : UIScrollView UICollectionView 和UICollectionViewCon ...
- MongoDB安装及配置成服务
最近接收了个新项目,这个项目用到了很多之前没用过的(MongoDB.Redis.MVC5+EF6 等等),以前只是看过别人用,自己从未尝试,唯独用了MVC2+EF4,可能是我落伍了,不扯了,进入正题. ...
- ORA-02266: unique/primary keys in table referenced by enabled foreign keys
在数据库里面使用TRUNCATE命令截断一个表的数据时,遇到如下错误 SQL >TRUNCATE TABLE ESCMOWNER.SUBX_ITEM ORA-02266: unique/prim ...
- ORA-10635: Invalid segment or tablespace type
上周星期天在迁移数据时,碰到了ORA-10635: Invalid segment or tablespace type 错误,当时的操作环境如下: 操作系统版本: [oracle@xxxxx scr ...
- Oracle数据库迁移
1 在数据迁移时,用户首先有权限修改数据库,并且进行表空间创建.删除等权利 例如: select * from dba_tab_privs where grantee='SCOT'; ---查看SCO ...
- 设置DIV可编辑
<div id="move" contentEditable="true">可编辑</div> 设置contentEditable属性可 ...
- 3D坦克大战游戏iOS源码
3D坦克大战游戏源码,该游戏是基于xcode 4.3,ios sdk 5.1开发.在xcode4.3.3上完美无报错.兼容ios4.3-ios6.0 ,一款ios平台上难得的3D坦克大战游戏源码,有2 ...
- 【Windows编程】系列第十篇:文本插入符
大家知道,在使用微软的编程环境创建工程时会让你选择是控制台模式还是Windows应用程序.如果选择控制台的console模式,就会在运行时出现一个黑洞洞的字符模式窗口,里面就有等待输入一闪一闪的插入符 ...
- FeWeb基础之JavaScript简介
FeWeb基础之JavaScript简介 1.JavaScript的基本介绍 JavaScript是一种基于对象和事件驱动并具有安全性能的脚本语言,它是通过嵌入或调入在标准的HTML语言中实现的.Ja ...