• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Contribution [How-To] Compile PHP Phalcon for PHP 5.4 5.5 5.6 7.0

StéphanS

Regular Pleskian
NOTE: PHP 5.4 is no longer supported

For more info, please refer to:

https://devblog.plesk.com/2015/08/adding-custom-php-modules-in-plesk/


First install some basic dependencies:
Code:
yum install git make gcc glibc-devel zlib-devel

Then create the actual function to build and install PHP Phalcon
Code:
function plesk_php_install_phalcon {
cd
PHP_VERSION="$1"
echo "Building Phalcon for PHP Version: $PHP_VERSION..."
yum -y install plesk-php$(tr -d . <<<$PHP_VERSION)-devel
rm -rfv /opt/plesk/php/$PHP_VERSION/include/php/ext/cphalcon/
rm -fv /opt/plesk/php/$PHP_VERSION/lib64/php/modules/phalcon.so
rm -fv /opt/plesk/php/$PHP_VERSION/etc/php.d/phalcon.ini
cd /opt/plesk/php/$PHP_VERSION/include/php/ext/
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd /opt/plesk/php/$PHP_VERSION/include/php/ext/cphalcon/build/
sed -i 's#./configure#./configure CFLAGS="-O2"#g' install
PATH=/opt/plesk/php/$PHP_VERSION/bin:$PATH ./install
ls -la /opt/plesk/php/$PHP_VERSION/lib64/php/modules/phalcon.so
echo 'extension=phalcon.so' > /opt/plesk/php/$PHP_VERSION/etc/php.d/phalcon.ini
/opt/plesk/php/$PHP_VERSION/bin/php -v
/opt/plesk/php/$PHP_VERSION/bin/php -i | grep -i phalcon
}

To install run:
Code:
plesk_php_install_phalcon 5.6

Or install for all compatible versions:
Code:
for PHP_VERSION in 5.{5..6}
do
plesk_php_install_phalcon $PHP_VERSION
done

Whenever Phalcon becomes compatible with PHP 7
You can use:
Code:
for PHP_VERSION in {5.{5..6},7.0}
do
plesk_php_install_phalcon $PHP_VERSION
done


Now all that is left is to have Plesk find PHP Phalcon Extension(s):
Code:
plesk bin php_handler --reread



From devblog article (but I didn't need to do this step):

As a final touch, to have the extension appear on the customers’ phpinfo pages, clear the checkbox, click OK, and wait for the changes to be applied, then select the checkbox and apply the changes once again.




EDIT: If you really need PHP Phalcon on PHP 5.4, use:

Code:
cd
PHP_VERSION="5.4"
rm -rfv /opt/plesk/php/$PHP_VERSION/include/php/ext/cphalcon/
cd /opt/plesk/php/$PHP_VERSION/include/php/ext/
git clone -b 2.0.x --depth=1 git://github.com/phalcon/cphalcon.git
cd /opt/plesk/php/$PHP_VERSION/include/php/ext/cphalcon/build/
sed -i 's#./configure#./configure CFLAGS="-O2"#g' install
PATH=/opt/plesk/php/$PHP_VERSION/bin:$PATH ./install
ls -la /opt/plesk/php/$PHP_VERSION/lib64/php/modules/phalcon.so
echo 'extension=phalcon.so' > /opt/plesk/php/$PHP_VERSION/etc/php.d/phalcon.ini
/opt/plesk/php/$PHP_VERSION/bin/php -v
/opt/plesk/php/$PHP_VERSION/bin/php -i | grep -i phalcon
 
Last edited:
Back
Top