我正在尝试安装法尔康框架,我无法正确完成这一部分
将扩展添加到您的 php.ini:
extension=phalcon.so
最后,重新启动网络服务器
我已php.ini
在/etc/php5/apache2/
重新启动apache
服务器时更改了文件,但测试时未添加扩展名
<?php print_r(get_loaded_extensions()); ?>
输出
Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => bcmath
[8] => bz2
[9] => calendar
[10] => ctype
[11] => dba
[12] => dom
[13] => hash
[14] => fileinfo
[15] => filter
[16] => ftp
[17] => gettext
[18] => SPL
[19] => iconv
[20] => mbstring
[21] => session
[22] => posix
[23] => Reflection
[24] => standard
[25] => shmop
[26] => SimpleXML
[27] => soap
[28] => sockets
[29] => Phar
[30] => exif
[31] => sysvmsg
[32] => sysvsem
[33] => sysvshm
[34] => tokenizer
[35] => wddx
[36] => xml
[37] => xmlreader
[38] => xmlwriter
[39] => zip
[40] => apache2handler
[41] => PDO
[42] => curl
[43] => gd
[44] => imagick
[45] => imap
[46] => intl
[47] => json
[48] => mcrypt
[49] => memcache
[50] => ming
[51] => mysql
[52] => mysqli
[53] => pdo_mysql
[54] => pdo_sqlite
[55] => pspell
[56] => readline
[57] => recode
[58] => snmp
[59] => sqlite3
[60] => tidy
[61] => xmlrpc
[62] => xsl
[63] => mhash
[64] => Zend OPcache
)
phalcon
扩展无处可去。
我甚至尝试过这。
答案1
我按照以下步骤进行了设置...
sudo apt-get install php5-dev libpcre3-dev gcc make php5-mysql git-core autoconf
### Do these in any folder you want
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
### Create the extension ini file in /etc/php5/mods-available
echo 'extension=phalcon.so' | sudo tee -a /etc/php5/mods-available/phalcon.ini
cd /etc/php5/mods-available
sudo php5enmod phalcon
### Restart apache
sudo /etc/init.d/apache2 restart
答案2
我尝试了一下,我改用了 nginx + php-fpm,但工作流程应该是一样的。创建一个/etc/php5/mods-available
名为的文件phalcon.ini
:
echo 'extension=phalcon.so' | sudo tee -a /etc/php5/mods-available/phalcon.ini
现在创建此文件的符号链接(注意:我按照正确的方式操作,而不是直接转储文件)/etc/php5/conf.d/
:
sudo ln -s -T ../mods-available/phalcon.ini /etc/php5/conf.d/20-phalcon.ini
重新启动你的网络服务器(和 fpm,如果有的话),瞧!
数组 ( [0] => 核心 [1] => 日期 [2] => ereg [3] => libxml [4] => openssl [5] => pcre [6] => zlib [7] => bcmath [8] => bz2 [9] => 日历 [10] => ctype [11] => dba [12] => dom [13] => hash [14] => fileinfo [15] => 过滤器 [16] => ftp [17] => gettext [18] => SPL [19] => iconv [20] => json [21] => mbstring [22] => 会话 [23] => posix [24] => 反射 [25] => 标准 [26] => shmop [27] => SimpleXML [28] => soap [29] => 套接字 [30] => Phar [31] => exif [32] => sysvmsg [33] => sysvsem [34] => sysvshm [35] =>标记器 [36] => wddx [37] => xml [38] => xmlreader [39] => xmlwriter [40] => zip [41] => cgi-fcgi [42] => PDO [43] => gd [44] => mysql [45] => mysqli [46] => pdo_mysql [47] => pdo_pgsql [48] => pgsql [49] => mcrypt[50] => 法尔康[51] => mhash )