mac安装php
2021/10/18 11:39:27
本文主要是介绍mac安装php,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
brew reinstall php
安装完成配置:
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/php-8.0.11_
Already downloaded: /Users/huangdan07/Library/Caches/Homebrew/downloads/5f7fe12c310bba3fb550de97deff649d509fd63803b180f48fa768ca94e41d71--php-8.0.11_1.arm64_big_sur.bottle.tar.gz
==> Reinstalling php
==> Pouring php-8.0.11_1.arm64_big_sur.bottle.tar.gz
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set php_ini /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set php_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set doc_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set ext_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set bin_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set data_dir /opt/homebrew
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set cfg_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set www_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set man_dir /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set test_dir /opt/homebrew
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear config-set php_bin /opt/homebrew/
==> /opt/homebrew/Cellar/php/8.0.11_1/bin/pear update-channels
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/opt/homebrew/etc/php/8.0/
To start php:
brew services start php
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/php/sbin/php-fpm --nodaemonize
==> Summary
这篇关于mac安装php的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-19php8的协程和hyperf的协程有什么区别?-icode9专业技术文章分享
- 2024-12-19php8 的fiber是什么?-icode9专业技术文章分享
- 2024-12-05怎么在php8,1 里面开启 debug?-icode9专业技术文章分享
- 2024-12-05怎么在php8,1 里面开启 debug?-icode9专业技术文章分享
- 2024-11-29使用PHP 将ETH账户的资产汇集到一个账户
- 2024-11-23怎么实现安卓+php 热更新方案?-icode9专业技术文章分享
- 2024-11-22PHP 中怎么实现判断多个值是否为空、null 或者为 false?-icode9专业技术文章分享
- 2024-11-11开源 PHP 商城项目 CRMEB 二次开发和部署教程
- 2024-11-09怎么使用php在kaufland平台刊登商品?-icode9专业技术文章分享
- 2024-11-05PHP的抽象类和接口是什么,有什么区别-icode9专业技术文章分享