Home  >  Article  >  Backend Development  >  How to solve make hash php error problem

How to solve make hash php error problem

藏色散人
藏色散人Original
2022-01-18 10:16:491530browse

Solution to make hash php error problem: 1. Find "molten.c"; 2. Replace "HASH_FLAG_PERSISTENT" in the file with "IS_ARRAY_PERSISTENT"; 3. Save the file and configure php.ini .

How to solve make hash php error problem

The operating environment of this article: macOS 10.15.7 system, php7.3.24 version, DELL G3 computer

The local test environment is macOS 10.15. 7, nginx 1.19, php7.3.24, macbook air2017 computer

How to solve the make hash php error problem?

php7.3 installation extension Molten encounters make compilation HASH_FLAG_PERSISTENT error problem - Captain Mumu

1. Download the molten package https://github.com/chuan-yun/Molten And unzip the directory and enter the directory

cd /Applications/MAMP/bin/php/php7.3.24/include/php/ext/Molten-master

2. Execute phpize. The following phpize execution path is based on the path of the default php version in your environment. I used 7.3 (remember to switch to the swoole extension directory for execution)

sudo /Applications/MAMP/bin/php/php7.3.24/bin/phpize

3. Execute ./configure (note the path of php-config)

./configure --with-php-config=/Applications/MAMP/bin/php/php7.3.24/bin/php-config --enable-zipkin-header=yes

4. Then make && make install, you will encounter the problem as shown

This error is because HASH_FLAG_PERSISTENT has been changed to IS_ARRAY_PERSISTENT in versions after 7.3

Solution:

Found Path file (path to downloaded Molten-master)

/Applications/MAMP/bin/php/php7.3.24/include/php/ext/Molten-master/molten.c

Replace HASH_FLAG_PERSISTENT in the file with IS_ARRAY_PERSISTENT and save the file.

5. Continue to execute make && make install. After success, configure php.ini and add the following (note the path)

extension="/Applications/MAMP/bin/php/php7.3.24/lib/php/extensions/no-debug-non-zts-20180731/molten.so"

Recommended learning: "PHP Video Tutorial

The above is the detailed content of How to solve make hash php error problem. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn