I installed Phalcon PHP as described in https://docs.phalcon.io/3.4/en/webserver-wamp.
In this case the URL reads 3.4 because it applies alike for versions 4 and 5.
The WAMP server version is 3.2.6 configured with PHP 8.0.13
Everything was fine so far, so I continued installing the developer tools using composer as described in https://docs.phalcon.io/5.0/en/devtools.
Composer was installed globally and so were the developer tools, but when I type "phalcon" in the command window, the following error is shown:
C:>phalcon
Fatal error: Uncaught Error: Class "PhalconScript" not found in C:UsersJoachimAppDataRoamingComposervendorphalcondevtoolsphalcon.php:38
Stack trace:
#0 {main}
thrown in C:UsersJoachimAppDataRoamingComposervendorphalcondevtoolsphalcon.php on line 38
C:>
PSR and Phalcon extensions were successfully installed and I can see them in the WAMP Localhost page.
The Path environment variable contains the path to phalcon, composer, wamp, etc, nothing is missing as far as I can see.
Have anyone dealt with this error?
What could be the problem?
2
Answers
you didn’t mention which phalcon version but since you are using php 8 the only version supporting php 8 is phalcon 5
your issue is most likely in your php.ini for the cli since wamp uses different files for apache and cli.
to fix the issue first remove the devtools package you installed globally then edit the cli php.ini in
[wampDir]binphpphp8.0.13php.ini
and include psr and phalcon and install the devtools again using composeryou can also download the phar file here and test it in the cli
I’m a bit late answering this, but in case anyone else stumbles across it via Google the problem is that some namespaces have been altered between Phalcon4 and Phalcon5. I believe
PhalconConfig
is one of those classes.Until the devtools have been updated for Phalcon5, you’ll either need to build the scaffolding manually, or copy an old Phalcon 3 or 4 project and update the namespaces.
The perils of using alpha/beta releases, unfortunately.