PHP 5.5 加载 PhalconPHP 框架版本问题
Posted on 5 年前 , Last updated on 5 年前 by ueaner
前言
PHP 升级到 5.5 无法加载 PhalconPHP 扩展,提示以下错误:
PHP Warning: PHP Startup: phalcon: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
更新 PhalconPHP 扩展
查看官方 Phalcon 1.2.0 Released!! 博客中提到的引入的新功能有一项 Support for PHP 5.5
,果断更新。
# cd /usr/local/src/cphalcon/
# git fetch
remote: Counting objects: 11367, done.
remote: Compressing objects: 100% (3864/3864), done.
remote: Total 9974 (delta 7314), reused 8617 (delta 5996)
Receiving objects: 100% (9974/9974), 7.28 MiB | 30 KiB/s, done.
Resolving deltas: 100% (7314/7314), completed with 411 local objects.
From git://github.com/phalcon/cphalcon
38b84b2..0d052fc 1.0.0 -> origin/1.0.0
* [new branch] 1.0.1 -> origin/1.0.1
* [new branch] 1.1.0 -> origin/1.1.0
* [new branch] 1.2.0 -> origin/1.2.0
* [new branch] 1.2.1 -> origin/1.2.1
c29e62c..a9069f1 master -> origin/master
From git://github.com/phalcon/cphalcon
* [new tag] v1.0.0 -> v1.0.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.1.0 -> v1.1.0
* [new tag] v1.2.0 -> v1.2.0
网速很慢啊,经过几分钟的等待,源码从 github 上更新完了,看来我已经有一段时间没有更新过 Phalcon 了, 年初的时候用的 0.9 的版本,Phalcon 版本更新的还是很快的,推荐,不多说,开始重新编译:
# cd build/
# git checkout 1.2.0
Branch 1.2.0 set up to track remote branch 1.2.0 from origin.
Switched to a new branch '1.2.0'
# ./install
以上编译输出内容略...
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/lib64/php/modules/
Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation
编译成功,重启 php-fpm 或 Apache:
# service php-fpm reload
OR
# service httpd restart
看一下 Phalcon 现在的版本:
Enjoy!
转载请注明出处。
本文地址:http://blog.soliphp.com/post/php/php-5.5-to-load-phalcon-extension-version-issue