For those having problems running Phalcon php with WAMP Server 3.1.9. I hope this can help you solve them.
Date: 2019-10-05 |
OS : Microsoft Windows 10 |
WAMP: 3.1.9 |
PHP : 7.2.18 (5.6.40 for CLI) |
Phalcon PHP: 4.0
WAMP server 3.1.9 uses two different versions of PHP. The first is only to run the CLI (Command Line Interface) commands and the second is the one you choose to run with your web server (7.2.18 in my case).
To know what version of PHP is used by the CLI just take a look into the File Explorer and read the file located in the main PHP folder: DO_NOT_DELETE_5.6.40.txt
This version of Phalcon PHP requires two DLL libraries to be copied to the PHP version run by the web server, into its 'ext' folder:
- php_psr.dll
- php_phalcon.dll
Go to the folder named with the respective PHP version, run by the web server, and locate its 'ext' folder.
These extension files must be added in that order to the list of extensions, so open the file php.ini with your preferred text editor and add them as shown here:
extension=php_psr.dll
extension=php_phalcon.dll
Now, download the php_phalcon.dll library corresponding to the PHP version run by the CLI (5.6.40 in my case).
The url to download that specific version is this:
https://github.com/phalcon/cphalcon/releases/tag/v3.2.1
Copy this .dll file in the 'ext' folder of the PHP CLI version and then modify its php.ini file to load it.
Now you can enjoy the phalcon command line tools as well as the web tools.
That's it.
Restart your WAMP server for changes to take effect.