skip to Main Content

I’ve installed Phalcon and trying to create new project: phalcon project store. But instead of this I get these errors:

PHP Fatal error:  Uncaught Error: Class "PhalconConfig" not found in C:ComposervendorphalcondevtoolssrcBuilderComponentAbstractComponent.php:48
Stack trace:
#0 C:ComposervendorphalcondevtoolssrcCommandsBuiltinProject.php(74): PhalconDevToolsBuilderComponentAbstractComponent->__construct(Array)
#1 C:ComposervendorphalcondevtoolssrcScript.php(109): PhalconDevToolsCommandsBuiltinProject->run(Array)
#2 C:ComposervendorphalcondevtoolssrcScript.php(148): PhalconDevToolsScript->dispatch(Object(PhalconDevToolsCommandsBuiltinProject))
#3 C:Composervendorphalcondevtoolsphalcon(65): PhalconDevToolsScript->run()
#4 {main}
  thrown in C:ComposervendorphalcondevtoolssrcBuilderComponentAbstractComponent.php on line 48

Fatal error: Uncaught Error: Class "PhalconConfig" not found in C:ComposervendorphalcondevtoolssrcBuilderComponentAbstractComponent.php:48
Stack trace:
#0 C:ComposervendorphalcondevtoolssrcCommandsBuiltinProject.php(74): PhalconDevToolsBuilderComponentAbstractComponent->__construct(Array)
#1 C:ComposervendorphalcondevtoolssrcScript.php(109): PhalconDevToolsCommandsBuiltinProject->run(Array)
#2 C:ComposervendorphalcondevtoolssrcScript.php(148): PhalconDevToolsScript->dispatch(Object(PhalconDevToolsCommandsBuiltinProject))
#3 C:Composervendorphalcondevtoolsphalcon(65): PhalconDevToolsScript->run()
#4 {main}
  thrown in C:ComposervendorphalcondevtoolssrcBuilderComponentAbstractComponent.php on line 48

My PHP version is 8.0.8 Thread Safe x64, I’ve installed PSR extension and Phalcon 5.0.0 from here: https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta3, file phalcon-php8.0-ts-windows2019-vs16-x64.zip, that means I have compatible version of framework. phalcon.bat was added to environment variables. What’s the problem?

2

Answers


  1. Usually this error occurs when the extension is not loaded by php, see with phpinfo(), also run the componser install insider phalcon-devtools, but probably it is the php not loading the phalcon extension or PHP is not in the windows PATH , also check if the php-fpm log does not contain any extension loading errors, test in cmd the command php -v

    also create a index.php and try it

    <?php
    
    use PhalconMvcMicro;
    
    $app = new Micro();
    
    $app->get('/', function () { echo "<h1>test</h1>";});
    
    $app->handle();
    
    Login or Signup to reply.
  2. Try do the following Go to Edit The system environment variables -> system variables -> path -> edit add phalcon.bat folder path testing here i used C:UsersrenatoDownloadsphalcon-devtools-4.2.0phalcon-devtools-4.2.0 ( just path folder where the .sh/.bat it is, do not include the file and extension) and worked fine with php 8.0.16 windows 10 phalcon 5

    and then go to the power shell and input phalcon

    https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/

    Do not forget to run composer install inside phalcon devtools folder.

    also on powershell input php -m to see the loaded modules and if it has an error

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search