Switching PHP Version Causes Phalcon Extension Failure


The company uses PHP’s Phalcon framework as the back end. Phalcon’s greatest feature is that the bottom layer is implemented by C language. Using Phalcon framework, php_phalcon.dll extension must be installed. Previously, PHP version 7.2 was used. Later, considering performance and development efficiency, it was upgraded to PHP 7.3. Local development environment PHP upgrade is very convenient, you can switch versions. Then the following error occurred.


After Baidu, I found that the relevant information is very little, and the quality is very poor, basically unable to solve my problem.
To exclude other factors, I tested the extension of the php.ini file and finally decided that it was the extension of php_phalcon.dll.
In order to see if the installation steps were wrong, I went back to Phalcon’s documentation, found Phalcon’s release on GitHub according to the document’s instructions, and found that php_phalcon.dll needed to use different DLL files for different versions.
The DLL files adapted to PHP 7.3 were downloaded again, including nts and non-NTS versions. PC adapted to non-NTS versions. If installed with nts version, the following error will occur.


Attach GitHub address: https://github.com/phalcon/cphalcon/releases/tag/v3.4.4
Phalcon document address: https://docs.phalconphp.com/3.4/zh-cn/

Recommended Today

Implementation of PHP Facades

Example <?php class RealRoute{ public function get(){ Echo’Get me’; } } class Facade{ public static $resolvedInstance; public static $app; public static function __callStatic($method,$args){ $instance = static::getFacadeRoot(); if(!$instance){ throw new RuntimeException(‘A facade root has not been set.’); } return $instance->$method(…$args); } // Get the Facade root object public static function getFacadeRoot() { return static::resolveFacadeInstance(static::getFacadeAccessor()); } protected […]