3

I'm trying to install Phalcon frameworks and I can't get this part done right

  1. Add the extension to your php.ini:

    extension=phalcon.so

  2. Finally, restart the webserver

I've changed my php.ini file located at /etc/php5/apache2/ restart the apache server but the extension is not added when I test it through

<?php print_r(get_loaded_extensions()); ?>

output

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 extension is nowhere.

I even tried this.

2
  • Do you have any error message? any log? please explain the situation in more detail – PatomaS Mar 27 '14 at 0:37
  • @PatomaS What more I need to say? I'm trying to install Phalcon taking the steps phalconphp.com/en/download , I'm trying to see the extentions but extension=phalcon.so is not mentioned. – giannis christofakis Mar 28 '14 at 12:43
9

I did the setup via following these steps...

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
0
2

I worked through it, I used nginx + php-fpm instead, but the workflow should be the same. Create a file in /etc/php5/mods-available called phalcon.ini:

echo 'extension=phalcon.so' | sudo tee -a /etc/php5/mods-available/phalcon.ini

Now create a symbolic link to this file (note: I'm doing it the right way, instead of dumping the file directly) in /etc/php5/conf.d/:

sudo ln -s -T ../mods-available/phalcon.ini /etc/php5/conf.d/20-phalcon.ini

Restart your webserver (and fpm if you have it) and voila!

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] => json [21] => mbstring [22] => session [23] => posix [24] => Reflection [25] => standard [26] => shmop [27] => SimpleXML [28] => soap [29] => sockets [30] => Phar [31] => exif [32] => sysvmsg [33] => sysvsem [34] => sysvshm [35] => tokenizer [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] => phalcon [51] => mhash )

1
  • Worked for me with nginx and php5-fpm, the only change I had to make was to the symbolic link commmand: sudo ln -s -T /etc/php5/mods-available/phalcon.ini /etc/php5/fpm/conf.d/20-phalcon.ini (added the "fpm" subdirectory) - thanks! – Dave Hollingworth Mar 18 '15 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.