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 extension missing

I have a problem making phalcon work on my xamp locally.

I added the extension php_falcon for the version I have, also added php_psr and enable them in php.ini on php 7.3.5 version operation system X64 VC15.

On my wamp it seems that phalcon is enable but when I run composer to install devtools

Your requirements could not be resolved to an installable set of packages. Problem 1

  • phalcon/devtools v4.0.1 requires ext-phalcon ^4.0.0 -> the requested PHP extension phalcon is missing from your system.
  • phalcon/devtools v4.0.0 requires ext-phalcon ^4.0.0 -> the requested PHP extension phalcon is missing from your system.
  • Installation request for phalcon/devtools ^4.0 -> satisfiable by phalcon/devtools[v4.0.0, v4.0.1].

To enable extensions, verify that they are enabled in your .ini files:

  • C:\wamp64\bin\php\php7.3.5\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Installation failed, deleting ./composer.json. also when I run php --ri phalcon I get this -> Extension 'phalcon' not present

I have tried many ways ...



10.1k
edited Feb '20

Thnx for moving this to our forum so other people can have a look at this if the have the same issue. Cmd line PHP can have different settings then the one you are using on you webserver (Wammp). When you type on the cmd line php --ini you see what config files are used. These files should contain the phalcon and psr extension. The framework is called phalcon not falcon as you described in your issue. So steps for you to take:

  1. Make sure it's spelled phalcon
  2. Type php -m to show all installed extensions. PSR and Phalcon should be there.
  3. If phalcon or psr is missing check the location of your dll files normally this is the ext dir relative to you php executable and make sure they exists.
  4. Validate that one of the ini files contain extension=php_psr.dll and extension=php_phalcon.dll (psr first)

If that doesn't help you should get an error when running php -m. Please post this output here.

In my phpinfo it show that phalcon is enabled but in CMD when I write the command php -m it doesn't show.



10.1k
Accepted
answer

Yes, what I said above. you have different settings for cli. please check the steps

thank you for the help



10.1k
edited Feb '20

Glad I could help. Can you share what you changed in the end? This can be helpful for other users.

I had a problem with the CLI so I went to wampserver->tools->change php CLI Version->to the current php version

I had a problem with the CLI so I went to wampserver->tools->change php CLI Version->to the current php version

I have the same problem, i made this change but the problem continues... I need help, someone... Thank



10.1k

@rlinharescsg Same for you. Please follow the steps I described above and post output here

@rlinharescsg Same for you. Please follow the steps I described above and post output here

Thank for your fast reply. I have follow your steps. When i type php -m the psr and phalcon do not appear, but in my php.ini i added the extensions (psr in first).

Having the same php CLI and Web, i only need to add this extensions on php7.4.0->php.ini file, correct?!



10.1k
edited Feb '20

Check what ini is used by typing php --ini in one of these files psr and phalcon must be added. If it's in there and you type php -m you will get an error or see that the extension is loaded.

Check what ini is used by typing php --ini in one of these files psr and phalcon must be added. If it's in there and you type php -m you will get an error or see that the extension is loaded.

See the image...

I changed this file C:\wamp64\bin\php\php7.4.0\php.ini i'm trying to install the phalcon 4.0.3. Have this version some problem?



10.1k

@rlinharescsg Sorry, not seeing any image.

@rlinharescsg Sorry, not seeing any image.

please, right button -> see image

PHP Warning: PHP Startup: psr: Unable to initialize module Module compiled with module API=20190902 PHP compiled with module API=20180731 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: phalcon: Unable to initialize module Module compiled with module API=20190902 PHP compiled with module API=20180731 These options need to match in Unknown on line 0

I have getting this error, I've activated the extensions but i doesnt't work also i have the good versions. Does anybody know?

It's the way they works - include will encompass content of your different template to a very last template, partial will name volt approach to do all th of it. So pretty similar to above program for beginners, like checkhttps://forum.phalcon.io/discussion/19417/using-ms-sql-server-with-phalcon-3. If you need then update this covered view you ought to to don't forget approximately clearing cache for also final view.