Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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?



2.7k
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

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.phalconphp.com/en/latest/reference/install.html



2.7k

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

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