phalcon 2.0.0的安装

1、下载:

git clone -b 2.0.0 https://github.com/phalcon/cphalcon.git

git clone https://github.com/phalcon/zephir.git

git clone https://github.com/json-c/json-c.git

2、安装zephir: http://zephir-lang.com/install.html

  1)安装re2c

wget http://downloads.sourceforge.net/project/re2c/re2c/0.13.7.5/re2c-0.13.7.5.tar.gz
tar xzf re2c-0.13.7.5.tar.gz
cd re2c-0.13.7.5
./configure
make && make install

  2)安装

   先确定

ln -sv /usr/local/php5.5.14/bin/phpize /usr/local/bin/phpize
ln -sv /usr/local/php5.5.14/bin/php /usr/local/bin/php
ln -sv /usr/local/php5.5.14/bin/php-config /usr/local/bin/php-config

cd zephir
./install-json
./install -c

3、phalcon安装

cd cphalcon
../zephir/bin/zephir generate
../zephir/bin/zephir compile

or

zephir generate
zephir compile

4、复制cphalcon/ext/modules下的扩展到php中即可。

5、可能出现的报错:

Warning: Class "APCIterator" does not exist at compile time in /root/solf/phalcon/cphalcon/phalcon/cache/backend/apc.zep on 224 [nonexistent-class]

       apc = new \APCIterator("user", prefixPattern);
    ------------------------------------------------^

原因:https://github.com/phalcon/cphalcon/issues/2910#issuecomment-59255813

Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /root/solf/phalcon/cphalcon/phalcon/mvc/model/query.zep on 513 [nonexistent-function]

           let escapedValue = phalcon_orm_singlequotes(value);
    ---------------------------------------------------------^

原因:未知

你可能感兴趣的:(phalcon 2.0.0的安装)