这次忍住没爆粗口,但真的,通过rpm包,yum安全的php-fpm,让我无言以对。
一个Php程序代码,到处测试,显示的菜单都OK,但独独在正式服务器的php-fpm下,少了很多菜单,
不知道是肿么回事,排查了N次其它原因,都没有问题,最后定位到了php-fpm。
其它环境都是UPUW或是手工安装,但服务器是Yum安装。
于是,今晚试了手工安装php,搞定。
参考的URL:
https://www.cnblogs.com/achengmu/p/9517337.html
提前安装的列表
yum -y install openssl yum -y install openssl-devel yum -y install curl yum -y install curl-devel yum -y install libjpeg yum -y install libjpeg-devel yum -y install libpng yum -y install libpng-devel yum -y install freetype yum -y install freetype-devel yum -y install pcre yum -y install pcre-devel yum -y install libxslt yum -y install libxslt-devel yum -y install bzip2 yum -y install bzip2-devel yum -y install libxml2 yum -y install libxml2-devel
编译时的参数:
./configure --prefix=/usr/local/php7 --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
安全和帐号工作,都作足了。
那如何让这个php与yum的安装并存呢?
关键有两点对应:
一,/usr/local/php7/etc/php-fpm.d/www.conf
listen = 127.0.0.1:9001
二,nginx里对应行
fastcgi_pass 127.0.0.1:9001;
搞定!!!