最近项目中有用到 phalcon框架进行开发
于是帮助测试是同学在centos下搭建phalcon环境,
直接打开根据官网文档源码安装,
phalcon官方文档
sudo yum install php-devel pcre-devel gcc make
git clone https://github.com/phalcon/cphalcon
cd cphalcon/build
sudo ./install
出现报错
php 5 is no longer supported
但是 php -v 得到的版本是 7.0.30
经过一番追查发现主机上有多个 php 版本 ,
php默认是php7.0
但是 phpize 的默认版本却不是 php7.0 自带的 而是系统自带的php5.0的版本,
所以安装的时候需要使用指定的phpize
安装命令改为
sudo ./install --phpize /usr/local/php7.0.30/bin/phpize --php-config /usr/local/php7.0.30/bin/php-config
编译成功 !
当php.ini添加extension=phalcon.so后,重启php-fpm,
报错
PHP Warning: Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0
执行
php -m|gerp phalcon
发现扩展并没有加载进来
一追查才发现phalcon4.0加了依赖条件,必须先安装psr扩展
而3.X的版本不需要,
直接依据官方文档编译安装3.4 的版本,搞定!
Way cool! Some very valid points! I appreciate you writing this post and the rest of the site is very good. Krystyna Towney Lucia
You are my inspiration , I possess few web logs and sometimes run out from to post. Dru Shaun Coopersmith
Greetings! Very helpful advice on this article! It is the little changes that make the biggest changes. Thanks a lot for sharing! Essy Randell Ursola
Highly energetic post, I loved that a lot. Will there be a part 2? Marge Carroll Briant