解决验证码显示不了的方案
验证码显示不了
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install libmcrypt libmcrypt-devel mcrypt mhash -y
yum install php70w php70w-bcmath php70w-cli php70w-common php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-mysqlnd php70w-odbc php70w-opcache php70w-pdo php70w-pdo_dblib php70w-pear php70w-pecl-apcu php70w-pecl-imagick php70w-pecl-xdebug php70w-pgsql php70w-phpdbg php70w-process php70w-pspell php70w-recode php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc php70w-pecl-redis.x86_64 --skip-broken -y
#有redis的要加redis依赖,然后重启php-fpm
/etc/init.d/php-fpm restart
vim /etc/php-fpm.d/www.conf
user = nginx
group = nginx
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
session目录写入的权限
Chmod 755 -R /var/lib/php
如果你想把session写入redis,需要安装php的redis扩展包
yum search php70w-pecl-redis.x86_64 #如果安装版本不一样php的session就无法保存到redis中
vim /etc/php-fpm.d/www.conf
user = nginx
group = nginx
php_value[session.save_handler] = Redis
php_value[session.save_path] = 'tcp://192.168.1.2:6688'
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache