国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > PHP > 正文

CentOS6.5獨立配置PHP環境

2020-03-22 18:04:58
字體:
來源:轉載
供稿:網友
  • SERVER環境說明:

    OS:CentOS6.5(阿里云官方)

    WebServer:Nginx

    步驟:1.下載解壓

    網址下載http://php.net/downloads.php

    2.編譯

    ./configure --prefix=/usr/local/php --with-mysql --with-mysql-sock --with-mysqli --enable-fpm --with-ncurses --enable-soap --with-libxml-dir --with-XMLrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sqlite-utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear

    其中阿里云的鏡像CentOS 沒有 ncurses XMLrpc sqlite3 這3個依賴 我直接把這3個依賴刪除了

    3.建立軟連接4.遇到的問題1>.服務器html文件可以訪問,php文件無法訪問。

    log:2014/11/102014/11/10 12:55:24 [alert] 6438#0: 1024 worker_connections are not enough
    2014/11/10 12:55:24 [error] 6438#0: *6207 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1,
    2014/11/13 19:14:13 [alert] 1596#0: 5000 worker_connections are not enough
    2014/11/13 19:14:13 [error] 1596#0: *7042 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: 114.215.175.240, request: "GET /index.php HTTP/1.0", upstream: "http://127.0.0.1:80/index.php", host: "127.0.0.1"

    解決過程:

    1.http://www.th7.cn/Program/php/201408/254237.shtml 修改 php-fpm.conf request_terminate_timeout=0; 沒用
    2.nginx.conf 修改worker_connections 1024--5000 沒用
    3.http://www.netingcn.com/nginx-proxy-error-500.html解決辦法就是修改配置文件中的worker_connections值,將其調大。但是今天在本機的nginx中配置一個proxy,完全沒有外界的訪問的情況也提示上述錯誤,試著修改worker_connections也沒有解決問題。文中是代理回環。我沒有用apache。所以將apache-php部分注釋掉。保留php-fpm部分。問題解決。

    2>.訪問php提示"File not found.",同時在錯誤日志中看到:FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream解決過程:

    參考 http://www.jb51.net/article/47916.htm

    在Nginx配置文件中找到定義調用腳本文件的地方:fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;

    改為:astcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    PHP編程

    鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 临泉县| 甘南县| 嵊泗县| 同江市| 介休市| 昭通市| 牟定县| 龙岩市| 鄢陵县| 乐都县| 龙门县| 古丈县| 永春县| 乐亭县| 台中市| 临颍县| 株洲县| 麻栗坡县| 定南县| 南京市| 长宁区| 涟源市| 勃利县| 晋州市| 会泽县| 莆田市| 盐亭县| 建平县| 磐安县| 神农架林区| 大邑县| 阿巴嘎旗| 安徽省| 新巴尔虎右旗| 西吉县| 嘉善县| 宁河县| 通州区| 浠水县| 河曲县| 霍城县|