WebFaction
Community site: login faq
2
1

Is it possible to install the Phalcon PHP C extension framework? Install instructions: http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac

asked 11 Jun '13, 21:12

tstrokes's gravatar image

tstrokes
2313
accept rate: 0%

Interestingly, this is also a highly requested feature in Google App Engine for PHP : http://code.google.com/p/googleappengine/issues/detail?id=9336 and cPanel : features.cpanel.net/responses/add-support-for-phalconphp-extension-apache-php

(12 Jun '13, 02:56) epqrs epqrs's gravatar image

To install phalcon for php 5.4 you would first need to download it into your home directory:

cd ~
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build

php 5.2 is our default php version, which is not supported by cphalcon, so you would need to make some edits in their install script. You would first need to change phpize to phpize54 in line 53 and then change the last line from...

phpize && aclocal && $LIBTOOLIZE_BIN --force && autoheader && autoconf && ./configure --enable-phalcon && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"

to...

phpize54 && aclocal && $LIBTOOLIZE_BIN --force && autoheader && autoconf && ./configure --with-php-config=/usr/local/bin/php54-config --enable-phalcon && make && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"

Notice the phpize change again, the --with-php-config option in the configure command and the missing make install command.

Running the install command with ./install should complete without errors and you should be able to view the modules in the 32bit/modules directory or the 64bit/modules one, depending on the architecture of the server you are on.

You would then need to customize your php.ini file to include those using the extension_dir directive. See the similar How do I install the Imagick PECL extension for my PHP 5.3 application? for further info.

When that's done, a phpinfo() call should show that version 1.1.0 of phalcon is loaded.

permanent link

answered 12 Jun '13, 08:35

iliasr's gravatar image

iliasr ♦♦
1.7k4
accept rate: 37%

Thank you for the instructions. I was able to install everything successfully.

(12 Jun '13, 11:17) tstrokes tstrokes's gravatar image

This method seems outdated. I believe the phalcon install script has changed a lot since June 2013. Has anyone been able to successfully install Phalcon 1.2.6 on WebFaction? When I run the install script, it throws a few errors about type casting.

(11 Mar '14, 11:52) tylersnowden tylersnowden's gravatar image

I just responded to your support ticket.

(11 Mar '14, 23:15) yulian yulian's gravatar image

Here are the steps to compile Phalcon 1.2.6 on our centos6-64 servers:

PHP-5.4:

git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/ext
phpize54
./configure --with-php-config=/usr/local/bin/php54-config --enable-phalcon
make
mkdir ~/php54-exts && cp modules/phalcon.so ~/php54-exts/
ln -s /usr/local/lib/php54/extensions/no-debug-non-zts-20100525/* ~/php54-exts/

Add a php.ini with the following contents to the root of your application to enable the extension:

extension_dir = /home/username/php54-exts
extension = phalcon.so

PHP-5.5:

git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/ext
phpize55
./configure --with-php-config=/usr/local/bin/php55-config --enable-phalcon
make
mkdir ~/php55-exts && cp modules/phalcon.so ~/php55-exts/
ln -s /usr/local/lib/php55/extensions/no-debug-non-zts-20121212/* ~/php55-exts/

Add a php.ini with the following contents to the root of your application to enable the extension:

extension_dir = /home/username/php55-exts
extension = phalcon.so
permanent link

answered 11 Mar '14, 23:27

yulian's gravatar image

yulian
27214
accept rate: 24%

edited 11 Mar '14, 23:34

@yulians answer is also correct for PHP 5.6, just change 55 to 56 and go on

permanent link

answered 16 Sep '15, 23:30

totumfacky's gravatar image

totumfacky
154
accept rate: 0%

has anyone tried to install phalcon 3.1.2 with php70? Tried to follow @yulians instructions but it errors out with

error: unknown type name ‘zend_object_value’ make: *** [phalcon.lo] Error 1

permanent link

answered 09 Apr, 17:55

mavick's gravatar image

mavick
112
accept rate: 0%

edited 09 Apr, 18:12

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×249
×100
×6
×3

question asked: 11 Jun '13, 21:12

question was seen: 8,335 times

last updated: 09 Apr, 18:12

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM