Installing developer tools requires slightly more effort.
phalcon commands
Download phalcon-developer-tools package here:
https://github.com/phalcon/phalcon-devtools
Extract it to some convenient path.
Via git :
git clone git://github.com/phalcon/phalcon-devtools.git
Install and create a phalcon symlink:
cd phalcon-devtools
sudo ./phalcon.sh
Create a symbolink link to the phalcon.php script, replace this with the right path:
alias phalcon="/home/sherwinrobles/phalcon-devtools/phalcon.php"
alias phalcon="/home/sherwinrobles/phalcon-devtools/phalcon.php"
Remember to restart the console to reload the environment variables. Let’s try it out by listing available commands.
phalcon commands
Gives me this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phalcon.so' - /usr/lib/php5/20121212/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
ERROR: Phalcon extension isn't installed, follow these instructions to install it: http://docs.phalconphp.com/en/latest/reference/install.html
Solution:
Instead of php.ini it looks for phalcon extension in /etc/php5/cli/conf.d/ & /etc/php5/apache2/conf.d/ folder.
/etc/php5/apache2/conf.d/50-phalcon.ini
Create each and paste this: extension=phalcon.so
Instead of php.ini it looks for phalcon extension in /etc/php5/cli/conf.d/ & /etc/php5/apache2/conf.d/ folder.
You need to load PDO first before Phalcon.
The ini file that loads phalcon should be prefixed to a number higher than the one PDO is. So in my system I have:
/etc/php5/cli/conf.d/50-phalcon.ini /etc/php5/apache2/conf.d/50-phalcon.ini
Create each and paste this: extension=phalcon.so
Find loaded php.ini with these commands.
sudo php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
sudo php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Remove the line "extension = phalcon.so" if you previously add this from the main php.ini file
Congratulations you now have Phalcon tools installed!
Comments
Professional Website Development Company