Installing Phalcon with custombuild 2.0

braf

New member
Joined
Jul 2, 2014
Messages
4
Hi All,

I thought I'd share my experience setting up the Phalcon extension with custombuild 2.0 using the different php versions available as I had a few issues getting it all working and it may help others with phalcon or installing other php extensions as it turned out to be quite simple once you know what to do.

So first thing to note is you don't need to install php5-dev etc like it says in the install instructions.

To start. Download the repo to the location of your choice.

Code:
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
At this point we need to make a tweak to the installer script to point to our php version. In this example I'll be applying to php 5.3

Code:
cp install install53
Then edit the install file and change the end line from.

Code:
phpize && ./configure --enable-phalcon  && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"
to
Code:
phpize && ./configure --enable-phalcon [B]--with-php-config=/usr/local/php53/bin/php-config[/B] && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"
The key in this being the command --with-php-config=/usr/local/php53/bin/php-config where php53 would be php54 or php55 etc for other installations

Now you can run ./install53 to compile and install the extension into the right directory.

Finally add the module to your php configuration. I used the following command.

Code:
echo "extension=phalcon.so" > /usr/local/php53/lib/php.conf.d/phalcon.ini
 

tuoiteen

New member
Joined
Dec 11, 2015
Messages
2
in last custombuild with php 5.6
should change php-config dir to
PHP:
/usr/local/bin/php-config
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,932
Location
GMT +7.00
Hello,

php-config can be found in /usr/local/bin/php-config if you use PHP as mod_php, otherwise it will be located at /usr/local/php5*/bin/php-config, where php5* can be one of the following:

php53
php54
php55
php56
php70
 
Top