亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Unable to initialize module Windows版本phpredis擴展

標簽:
PHP

版权声明:经验之谈,不知能否换包辣条,另,转载请注明出处。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 <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F [-O]]
  -c <path>|<file> 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 <dir>
                   Specify alternative prefix path to FastCGI process manager (default: /usr/local/php5.6).
  -g, --pid <file>
                   Specify the PID file location.
  -y, --fpm-config <file>
                   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等等,这些都是重要的信息,对于安装拓展来说尤其重要! 
https://img1.sycdn.imooc.com//5b95cbc500015c1410020641.jpg

上面的几个重要参数:

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位的机器也可以用!但是反过来就不行了。

https://img1.sycdn.imooc.com//5b95cbce0001846006070393.jpg

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

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

點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消