Tuesday, April 18, 2017

How to install Phalcon PHP on Lubuntu


Phalcon is an open source, php framework written as C-extension, optimized for high performance, meaning it is focus on delivering faster speed for website and application. In this article i will show you how to setup phalcon framework on lubuntu.

Unlike laravel, which is currently the most popular php framework on the market, you probably never heard about phalcon, because this framework is relatively new.

Step by step how to install phalcon on lubuntu
  • open command line (press CTRL + ALT + T)
  • run this command
  • curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
    
  • install php phalcon package
  • For php7
    sudo apt-get install php7.0-phalcon
    For php5
    sudo apt-get install php5-phalcon
  • done!

After the installation a config file will be created (phalcon.ini), located on /etc/php/7.0/mods-available/phalcon.ini

Unlike laravel which have predefined directory structure, phalcon let you decide your own directory structure, this is quite confusing for beginners who started learning this framework.

But in general these are the suggested directory structure for phalcon:
project-name/
  app/
    controllers/
    models/
    views/
  public/
    css/
    img/
    js/

For starter, you can try the phalcon tutorial sample code on github.

No comments:

Post a Comment