How to solve make hash php error problem

藏色散人
Release: 2023-03-14 20:46:01
Original
1568 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

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"
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template