We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon Devtools error

First I have clone the git.

git clone https://github.com/phalcon/phalcon-devtools.git

sudo ln -s /home/derandi/phalcon-devtools/phalcon.php /usr/local/bin/phalcon

chmod +x /usr/local/bin/phalcon

Then I try phalcon commands, and the result.

/home/derandi/zephir/prototypes/phalcon.php: line 1: ?php: No such file or directory

/home/derandi/zephir/prototypes/phalcon.php: line 3: namespace: command not found

/home/derandi/zephir/prototypes/phalcon.php: line 4: class: command not found

/home/derandi/zephir/prototypes/phalcon.php: line 8: syntax error near unexpected token `('

/home/derandi/zephir/prototypes/phalcon.php: line 8: ` public static function setDi($di)'

How to fix this?



7.6k
Accepted
answer

Hi, You do something wrong... This error is probably caused by earlier attempts install phalcon devtools.

To fix it please: 1) sudo rm /usr/local/bin/phalcon 2) cd /home/derandi/phalcon-devtools 3) make sure taht you see phalcon.php file in this folder 4) sudo ln -s phalcon.php /usr/local/bin/phalcon 5) chmod +x /usr/local/bin/phalcon



2.6k

I have another problem, now when im use command again this the result

ERROR: Phalcon extension isn't installed, follow these instructions to install it: https://docs.phalcon.io/en/latest/reference/install.html



7.6k

ok, so tell me again - have you "Phalcon" displayed after call php -m command? if no look here:

https://forum.phalcon.io/discussion/15339/error-phalcon-extension-isnt-installed-phalcon-3-php-7-centos-7#C45229