下载redis-4.2.0.tgz
解压进入目录
然后执行
/usr/local/php5.5/bin/phpize
./configure --with-php-config=/usr/local/php5.5/bin/php-config --enable-redis
make && make install
在到php.ini最后添加下
extension=redis.so
重启php...	
	
 								
	
		
		
			 
		 
	 
		
		ext/iconv/.libs/iconv.o(.text+0x1738): In function `zif_iconv_mime_encode':/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1017: undefined reference to `libiconv_open'ext/iconv/.libs/iconv.o(.text+0x1756):/home/jjdai/work/zhup...	
	
 								
	
		
		
			 
		 
	 
		
		nginx和php安装省略
查看php redis访问支持
[root@web01 ~]# rpm -qa|grep redis
php71w-pecl-redis-3.1.6-1.w7.x86_64
##安装配置redis    10.0.0.51
[root@db01 ~]# yum install redis -y
[r...	
	
 								
	
		
		
			 
		 
	 
		
		#安装PHP7.4 
安装php第三方官方yum源 
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm -y 
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y 
#安装yum-tools管理工具...	
	
 								
	
		
		
			 
		 
	 
		
		安装源yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm安装管理工具yum install yum-utils安装yum install php74-php-gd php74-php-pdo php74-php-mbstring php...	
	
 								
	
		
		
			 
		 
	 
		
		在数据提交中出现了POST大量数据超多字段的将近10000个字段,部分字段没有接受;修改方法为修改php.ini将max_input_var调大,该值默认为1000max_input_vars = 10000其他:在nginx中相近的配置有:keepalive_timeout  60;send_timeout 3m;client_max_body_size 500m;例如:修改上传图片的最大限制,避免entity too large的错误首先,将php的upload...	
	
 								
	
		
		
			 
		 
	 
		
		添加如下代码    header('Access-Control-Allow-Origin:*');...	
	
		2022-07-13 / 
		1271 次浏览 / 
		程序技术   
	 
 								
	
		
		
			 
		 
	 
		
		连接 MySQL在我们访问 MySQL 数据库前,我们需要先连接到数据库服务器:实例 (MySQLi - 面向对象)<?php
$servername = "localhost";
$username = "username";
$password = "password";
 
// 创建连接
$conn =...	
	
 								
	
		
		
			 
		 
	 
		
		只需要安装memcachedwget http://pecl.php.net/get/memcached-3.1.5.tgzyum -y install libmemcached libmemcached-devel/app/php/bin/phpize./configure --with-php-config=/app/php/bin/php-config --enable-memcachedmake && make installmemcache扩展方法/...	
	
 								
	
		
		
			 
		 
	 
		
		在php.ini 最后添加如下内容;[opcache]zend_extension=opcache.so #注意这里有个坑:就是extension=opcache.so错误,所有怎么重启都不生效。opcache.enable=1opcache.enable_cli=1opcache.memory_consumption=448opcache.interned_strings_buffer=8opcache.max_accelerated_files=100000opcache...