【问题标题】:Can't performe ajax (domxml) request's using nginx+php-fpm (5.2.17)无法使用 nginx+php-fpm (5.2.17) 执行 ajax (domxml) 请求
【发布时间】:2014-08-15 09:46:30
【问题描述】:

我想将我的一些 php 应用程序从 apache+mod_php 迁移到 nginx+php-fpm。 一切正常,但一些 JavaScript 停止工作。

错误是:

TypeError: mainTlistObject.xmlHttp.responseXML is null

Nginx 返回 200 OK。但是响应中没有xml数据。

也许我错过了 php 中的一些配置选项(xml 扩展?)

./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --enable-pdo --with-curl --disable-debug --with-pic --disable-rpath --enable-inline-optimization --with-bz2 --enable-xml --with -zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --with-xsl --enable-zip --with-pcre-regex - -with-gd --without-pdo-sqlite --with-pdo-mysql --without-sqlite --with-jpeg-dir=/usr/lib/x86_64-linux-gnu --with-png-dir=/ usr/lib/x86_64-linux-gnu --with-mysql --enable-bcmath --enable-calendar --enable-exif --enable-ftp --with-gettext --with-mysqli --with-kerberos= /usr/lib/x86_64-linux-gnu --enable-dbase --with-gmp --enable-shmop --enable-wddx --with-gd --with-freetype-dir=/usr/lib/x86_64- linux-gnu --prefix=/opt/php5.2

用于 php 的 nginx 部分:

    location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/opt/php5.2/php5.2.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            include fastcgi_params;
    } 

【问题讨论】:

    标签: ajax nginx php


    【解决方案1】:

    我的错。只是忘记在 php.ini 中指定“output_buffering = 4096”

    【讨论】:

      猜你喜欢
      • 2015-04-20
      • 2021-11-24
      • 1970-01-01
      • 1970-01-01
      • 2017-11-09
      • 2021-01-16
      • 2017-02-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多