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

Fatal error: Class 'Phalcon\Script' not found

Step 1 Create the "test" directory structure without any webtools stuff phalcon create-project /var/www/test --enable-webtools

Step 2 I change the directory to "test". cd /var/www/test phalcon webtools --action enable

I can find webtools in the directory , but can't working Fatal error: Class 'Phalcon\Script' not found in /usr/share/pear/Phalcon/Web/Tools.php on line 216

OS:CentOS 6.2 PHP version:PHP 5.4 Phalcon Devtools version:0.8.0 Phalcon version:0.8.0

How did you install the dev tools? Using the pear.phalcon.io ?

I installed the dev tools by using the pear.phalcon.io.



98.9k
Accepted
answer

Can you install it from Github?

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

Yes! This manner works well. Thanks a lot.

this solution does not work for me, I have macosx yosemite I try to install devtools inside my user bin folder in my ~/bin/ i run MyUser$ git clone https://github.com/phalcon/phalcon-devtools.git

and i change the folder name "phalcon-devtools" to "devtools" and run MyUser$ sudo ln -s ~/bin/devtools/phalcon.php /usr/bin/phalcon

then i run MyUser$ sudo chmod ugo+x /usr/bin/phalcon

and then restart my terminal and when I try to run MyUser$ phalcon commands

Fatal error: Class 'Phalcon\Script' not found in /Users/MyUser/bin/devtools/phalcon.php on line 40

¿What is wrong?



12.2k
edited May '15

I had the same problem at Ubuntu

after installation I enabled phalcon module for php.

Cli and Apache/Nginx uses different ENV so you have to enamle this extension for WebServers and CLI env.

on ubuntu it's looks like this command sudo php5enmod phalcon