栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

Unable to initialize module Windows版本phpredis扩展

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Unable to initialize module Windows版本phpredis扩展

版权声明:经验之谈,不知能否换包辣条,另,转载请注明出处。https://www.cnblogs.com/zmdComeOn/category/1295248.html

[root@VM_0_2_centos phpredis-master]# /usr/local/php5.6/sbin/php-fpm reload
[06-Sep-2018 18:19:35] NOTICE: PHP message: PHP Warning:  PHP Startup: redis: Unable to initialize module
Module compiled with module API=20100525PHP    compiled with module API=20131226These options need to match
 in Unknown on line 0Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p ] [-g ] [-c ] [-d foo[=bar]] [-y ] [-D] [-F [-O]]
  -c | Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -h               This help
  -i               PHP information
  -m               Show compiled in modules
  -v               Version number
  -p, --prefix 
                   Specify alternative prefix path to FastCGI process manager (default: /usr/local/php5.6).
  -g, --pid 
                   Specify the PID file location.
  -y, --fpm-config 
                   Specify alternative path to FastCGI process manager config file.
  -t, --test       Test FPM configuration and exit
  -D, --daemonize  force to run in background, and ignore daemonize option from config file
  -F, --nodaemonize
                   force to stay in foreground, and ignore daemonize option from config file
  -O, --force-stderr
                   force output to stderr in nodaemonize even if stderr is not a TTY
  -R, --allow-to-run-as-root
                   Allow pool to run as root (disabled by default)

我是在安装redis的时候碰到类似问题,当时没有记录,因为很快就被修复了,说一说出现这个问题的原因,只有一个: 
你下载的拓展和你的php版本不符合! 

phpinfo里面的重要信息,nts,x86

当我们使用phpinfo的时候,多数时候都是在看模块有没有装上,但是其他重要信息却忽略了,例如,为啥我的拓展老是装不上,下载的拓展上面一长串啥意思?nts x86 5.5等等,这些都是重要的信息,对于安装拓展来说尤其重要! 

上面的几个重要参数:

1 compiler :编译器
2 Architecture :CPU架构
3 Configuration File (php.ini) Path :php配置文件的位置,这里才是你的配置文件加载的真正地方,apache的同学小心了!
4 Thread Safety :线程安全与否
5 PHP Extension Build :php拓展建立的编号

 

以上几个参数关系到你能不能装上拓展,要认真看!下载拓展.dll文件的时候很多选项,那里面的选项就和这里的对应! 
例如下面: 
随便取一个来分析下:

1 php_igbinary-1.2.1-5.3-nts-vc9-x86.zip

 

意思是:1.2.1版本的php_igbinary拓展,适合的php版本是5.3及以上,vc9编译的这个拓展,,不支持线程安全,可以用在x86 cpu架构上,注意64位的机器也可以用!但是反过来就不行了。

是不是清楚很多了?我是在安装redis的时候碰到这个问题的。

原文出处:https://www.cnblogs.com/zmdComeOn/p/9600267.html

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/227751.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号