简体   繁体   中英

How Can I Setup Apache and PHP 8.1 and Run PHP with macOS 12

I Try To Setup PHP 8.1 on MacOS 12 Using brew but not working I can't found LoadModule php_module in Config File

You can use MAMP or XAMPP. Following is download link:

MAMP: MAMP Downalod

XAMPP: XAMPP Download

These are the easiest way to setup LAMP in Mac OS 12 (Monetery).

I just finished setting it up. Using homebrew "brew install php" and configuring my httpd.conf

#PHP was deprecated in macOS 11 and removed from macOS 12 Create new Line LoadModule php_module /path/php/lib/httpd/modules/libphp.so

'<FilesMatch.php$> SetHandler application/x-httpd-php

in '<'IfModule dir_module> add index.php

You will need to create a Signing Certificate

https://www.simplified.guide/macos/apache-php-homebrew-codesign

Sign the files libphp.so and the file "opcache.so"

Because of different Chips Intel or Mac the paths will vary.

Afterwards it should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM