国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial Why is the manually compiled php-redis module that is not displayed in phpinfo() after installing PHP using brew on mac M2?

Why is the manually compiled php-redis module that is not displayed in phpinfo() after installing PHP using brew on mac M2?

Apr 01, 2025 am 09:27 AM
redis nginx Browser macos cos Why red

Why is the manually compiled php-redis module that is not displayed in phpinfo() after installing PHP using brew on mac M2?

After installing PHP with Brew on Mac M2 system, manually compile and install the php-redis extension but cannot be displayed in phpinfo()

On macOS M2 system, after using Homebrew to install PHP, some users encountered problems when manually compiling and installing the php-redis extension: the command line can use the redis extension normally, the php -m command can also display redis, php -r "if (new Redis() == true){ echo "\r\n OK \r\n"; }" command also returns OK, but phpinfo() cannot display redis-related information.

The php.ini file path is confirmed to be /opt/homebrew/etc/php/7.3/php.ini , and the file is loaded through php -i | grep Loaded , and extension=redis configuration has been added to it.

The root cause of the problem may be the difference between the PHP configuration file and the CLI environment, and the configuration of PHP-FPM. The following provide troubleshooting steps:

  1. Verify the consistency of PHP version: Use php -v to view the command line PHP version, and then access phpinfo() page through the browser to confirm whether the PHP version used by the web server is consistent with the command line version. Version inconsistency is a common reason.

  2. Check PHP-FPM configuration: If you use PHP-FPM, you need to check its configuration file (usually located in /opt/homebrew/etc/php/7.3/php-fpm.d/ directory) to make sure it loads the correct php.ini file and that the file contains extension=redis configuration.

  3. Restart the web server: After modifying the configuration file, be sure to restart the web server for the changes to take effect (for example, restart Nginx using sudo nginx -s reload ).

  4. Confirm the extension file path: Check whether the extension_dir setting in the php.ini file is correct, and make sure that the redis.so file is located in this directory. Use php -i | grep extension_dir to view the current extension directory.

  5. Permissions issue: Make sure the web server has permission to read the redis.so file and php.ini file. Adjust file permissions if necessary.

  6. Compilation options: Confirm that the PHP version used when compiling php-redis is the same as the PHP version of the system, and the compilation parameters are correct.

If the above steps still fail to resolve the problem, it is recommended to check the system log and PHP error log to obtain more detailed error information for further troubleshooting. Check each step carefully to make sure all configurations are correct.

The above is the detailed content of Why is the manually compiled php-redis module that is not displayed in phpinfo() after installing PHP using brew on mac M2?. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Binance official website link Binance official website entrance address Binance official website link Binance official website entrance address Jul 04, 2025 pm 11:18 PM

The latest version of Binance is 2.101.8, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

Coin Security Ball Official Website Portal Binance Exchange Official Website Coin Security Ball Official Website Portal Binance Exchange Official Website Jul 04, 2025 pm 11:15 PM

The latest version of Binance is 2.101.8, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

How to trade BTC with your mobile phone? Complete operation process of Binance App How to trade BTC with your mobile phone? Complete operation process of Binance App Jul 07, 2025 pm 08:18 PM

How to conduct BTC transactions through Binance App? The answers are as follows: 1. Download and install the Binance App, complete registration and identity verification, and recharge funds; 2. Open the App to search for BTC, select trading pairs such as BTC/USDT, and be familiar with price charts and entrustment types; 3. Choose Buy or Sell, set limit orders or market orders and submit an order; 4. Check the order status on the entrustment page, view records through historical orders, and manage digital assets on the asset page.

How to collect airdrops in the currency circle? Are free tokens risky? Airdrop participation strategy How to collect airdrops in the currency circle? Are free tokens risky? Airdrop participation strategy Jul 07, 2025 pm 10:12 PM

Airdrops in the cryptocurrency field are a marketing promotion method for the project to distribute a certain number of tokens for free to community members or potential users. In this way, the project party hopes to increase the visibility of the tokens and attract more users to participate in the project, thereby expanding the size of the community and increasing the liquidity of the tokens. For users, airdrops provide opportunities to obtain project tokens without initial investment, and are one of the ways to get in touch with and understand new projects in the early stage.

The latest version of virtual currency exchange v6.129.0 official latest Android APP The latest version of virtual currency exchange v6.129.0 official latest Android APP Jul 07, 2025 pm 09:57 PM

The Virtual Currency Exchange APP is a professional digital asset trading application, providing users with safe and convenient digital currency trading services. The new v6.129.0 version has upgraded the performance and operation experience, aiming to bring a smoother trading experience.

The latest official version of virtual currency trading platform v6.129.0 Android app 2025 new version The latest official version of virtual currency trading platform v6.129.0 Android app 2025 new version Jul 07, 2025 pm 10:15 PM

The latest official version of the virtual currency trading platform v6.129.0 is a professional and secure digital asset trading application created for Android users. It provides rich market conditions, convenient trading functions and multiple security protection, and is committed to providing users with a first-class trading experience.

The latest version of the virtual digital currency exchange APP v6.128.0 Android genuine The latest version of the virtual digital currency exchange APP v6.128.0 Android genuine Jul 07, 2025 pm 10:03 PM

The Virtual Digital Coin Exchange APP is a powerful digital asset trading tool, committed to providing safe, professional and convenient trading services to global users. The platform supports a variety of mainstream and emerging digital asset transactions, with a bank-level security protection system and a smooth operating experience.

The latest download address and installation tutorial of Ouyi official app Ouyi The latest download address and installation tutorial of Ouyi official app Ouyi Jul 07, 2025 pm 09:51 PM

OKX is a world-leading digital asset service platform that provides users with trading, investment and management services for a variety of digital asset. It has comprehensive functions and convenient operation, and is trusted by the majority of users.

See all articles