Install Phalcon PHP framework

Phalcon is a lightning fast PHP framework which works with MySQL/MariaDB, PostgreSQL, MongoDB and Memcached. (all of which are available on our Jelastic Cloud PaaS).

If you read the Phalcon documentation, the install process looks quite scary compared to your average framework. That’s because Phalcon is installed as a PHP extension so actually you can’t install this framework at all on most hosting packages!

Just so happens we have a solution for that problem (who’d have guessed?).

We’ve also packaged Phalcon for our marketplace since this KB article was first published, so now you can skip the steps below and install Phalcon on your preferred web server in just a couple of clicks!

Install Phalcon from our dashboard marketplace

Install Phalcon from our dashboard marketplace

Grab yourself a free Jelastic account (all you need is your email address) hosted on our very own super-fast servers, right here in the UK, and launch a PHP web server of your choice – I’ll demo with Apache, but the instructions are basically the same if you prefer to use NGINX.

1. Launch an Apache Server

create-jelastic-apache-php-server

Make sure to select the PHP tab at the top. Everything else is just set to the defaults – 512MB RAM should be plenty as a max. scaling limit for this server. Feel free to add a MySQL or MongoDB server on the left if your application needs one!

2. Upload the compiled Phalcon PHP framework module

Phalcon comes as a PHP extension. We’ve already compiled it for you to work perfectly on our Jelastic platform. Download the latest compiled Phalcon PHP version matching to your PHP version, and then you only need to upload it to your new Jelastic server to get started.

Edit Jelastic Apache config editor menu button

Open the config editor using the highlighted button

Jelastic Apache Config editor showing the modules upload button

Click the Upload button next to modules and select the .so extension downloaded to your computer in the previous step

edit-jelastic-php-ini

Add the extension to the php.ini file. The name must match exactly to the one that you’ve uploaded (in this case, it’s for Phalcon 1.2.4 running on PHP 5.4). And of course, after your edits you must save the changes!

3. Restart Apache

Restart Apache using the highlighted button for your config. changes to take effect

Restart Apache using the highlighted button to apply your config. changes

That’s it! See how quick and easy it is to get the Phalcon PHP framework up and running on Jelastic! You can verify Phalcon is loaded properly by checking phpinfo() output:

phalcon-phpinfo

What Next?

Dive into the Phalcon documentation to learn how to get the most out of your new framework.

Remember, Jelastic provides role-based servers, so each server only performs a single task (e.g. web server, database server etc.) – your MySQL, MongoDB, and Memcached connection strings are not localhost! Check your emails carefully, and contact us if you need any help with those settings.

11
1293

Need More Help?

If you're still having problems, get in touch with our 24/7 support team! We'll be more than happy to help.