同样的代码放在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数组简写模式)的更多相关文章

  1. nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的

    源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...

  2. webSphere 部署项目时,访问报错:Error 500: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet【我】

    前提: 一个普通maven项目,在本地用Tomcat运行没有任何问题,但是放到 webSphere  测试环境上,访问时就报如下错误: Error 500: javax.servlet.Servlet ...

  3. 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 ...

  4. 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_ ...

  5. nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403

    遇到nginx报错:websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403 serv ...

  6. [nginx报错问题]reload时报错:nginx: [error] invalid PID number "" in ...

    错误 第一次探索nginx,执行以下命令时: nginx -s reload 报出错误: nginx: [error] invalid PID number "" in ... * ...

  7. nginx 报错Malformed HTTP request line, git 报错fatal: git-write-tree: error building trees

    nginx 报错由于url里有空格,包括url本身或者参数有空格 git 报错是因为解决冲突的时候没有add,即没有merge

  8. 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 ...

  9. nginx报错

    1. nginx报错 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid&q ...

随机推荐

  1. popupwindow展示

    样式: layout: popup_appinfo.xml <?xml version="1.0" encoding="utf-8"?> <L ...

  2. miterLimit和lineJoin属性

    <!DOCTYPE HTML> <head> <meta charset = "utf-8"> <title>starGirl< ...

  3. .Net缓存管理框架CacheManager

    using System; using CacheManager.Core; namespace ConsoleApplication { class Program { static void Ma ...

  4. SQLSERVER2008 R2安装说明

    SQLSERVER2008 R2安装说明一. 安装环境:SQLSERVER2008 R2有32位版本和64位版本,32位版本可以安装在WINDOWS XP及以上操32位和64位的操作系统上,如果服务器 ...

  5. Remote table-valued function calls are not allowed

    在SQL Server中,在链接服务器中调用表值函数(table-valued function)时,会遇到下面错误: SELECT * FROM LNK_TEST.TEST.DBO.TEST(12) ...

  6. jquery本地上传预览扩展(隐藏上传控件单击图片上传支持ie!!)

    我用到的原材料地址:http://www.cnblogs.com/leejersey/p/3660202.html 修改后: /// <reference path="../../Js ...

  7. 【转】Linux常用命令大全

    原文地址:http://www.php100.com/html/webkaifa/Linux/2009/1106/3485.html 系统信息 arch 显示机器的处理器架构(1) uname -m ...

  8. 追MM的各种算法

    原文:http://blog.sae.sina.com.cn/archives/3542#more-3542 看到一篇文章把算法描述的相当的好,先收藏了! 动态规划 基本上就是说:你追一个MM的时候, ...

  9. 推荐一款 chrome SSH 插件 - Secure Shell

    http://blog.csdn.net/jizhongchun/article/details/8519413 导读:我就是一个Chrome Fans.最近发现一款google官方出的SSH插件 - ...

  10. 数据处理之PostgreSQL过程语言学习

    前段时间,公司更换新的PostgreSQL数据集市的系统过程中,自己下载了postgresqlAPI的pdf文件研究了一下PostgreSQL数据集市.发现使用PostgreSQL过程语言可以大大加快 ...