【PHP】PHP5.6 缓存问题

来源:互联网 发布:win7无法安装软件 编辑:程序博客网 时间:2024/06/16 10:46

问题:自己在网上找了一个编译,不知道啥原因,修改php页面后总是不生效。


1.在网上查,可能是 php.ini中 “Zend Opcache"选项设置,但是在php.ini中无此选项

2.在php.ini中也无:opcache.validate_timestamps 的选项。


真是闹心,搞了俩三小时没搞定,最终使用新的编译重新安装了PHP

./configure --prefix=/usr/local/php --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-gd-native-ttf --enable-mbregex --enable-mbstring  --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip

去掉了

--enable-opcache

这个选项。奇怪的是,在phpInfo()页面并无 opcache的设置。。


去掉了 enable-opcache这个编译选项后,安装重启PHP,竟然好了。真是奇葩。



安装PHP:

1.下载源码

2.执行configure

sudo ./configure --prefix=/usr/local/php --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-gd-native-ttf --enable-mbregex --enable-mbstring  --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
3.sudo make

4.sudo make install

5.重启php: sudo service php restart

原创粉丝点击