search
HomeBackend DevelopmentPHP TutorialConfiguring Apache + PHP + MySQL_PHP tutorial in Mac OS X
Configuring Apache + PHP + MySQL_PHP tutorial in Mac OS XJul 20, 2016 am 11:15 AM
apachemacmysqlphpmainbyInsideandexistConfiguration

. This article takes Mac OS X 10.6.3 and 10.8.1 as examples. The main contents include:

!", which is located in "/Library (resource library)/ WebServer/Documents/", this is the default root directory of Apache .

through "http://[Local IP]/~[User Name]". It is worth noting that when Mac OS X canceled "Web Sharing" in 10.8, it also removed the "/Users/[username]/Sites/" directory, so 10.Accessing "http://[local IP]/~[username]" in 8 will display "403 Forbidden", but http://[local IP]/ can still be accessed. You can go to "System Preferences" -> "Security" -> "Firewall", turn on the firewall, and then check "Organization" in "Firewall Options" "block all incoming connections" can be done . You can also set httpd.conf to only allow localhost and 127.0.0.1 to access "/Library/WebServer/Documents/".

<span <code><Directory "/Library/WebServer/Documents">
    ......
    #
    # Controls who can get stuff from this server<strong>.</strong>
    #
    Order allow,deny
    #Allow from all
    Allow from 127<strong>.</strong>0.0<strong>.</strong>1
    Allow from localhost 

</Directory>
</code></span>

.5. MySQL provides installation instructions under Mac OS X.

Warning: The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' ", this should be caused by some circumstances /usr/local The host of /mysql/data<code>/usr/local/mysql/data has changed, just run "sudo chown -R mysql /usr/local/mysql/data<code>sudo chown -R mysql /usr/local/mysql/data" <.> .

0.0.1. The reason is that php looks for /var/mysql/mysql.sock<strong> by default when connecting, but the MAC version of MYSQL has changed the file location and placed it in / tmp downloaded </strong>. <code>/var/mysql/mysql.sockThe solution is to modify php.ini as follows:

<span <code>mysql.default_socket = /tmp/mysql.sock</code></span>> .

Being able to use phpMyAdmin to manage MySQL is a very effective way to test the effects of the previous steps.

Extension .

But the installation under Mac OS X is not so friendly, as follows:

http://localhost/phpmyadmin

, you will find that the "mcrypt extension cannot be loaded, please check your PHP configuration ." prompt is gone, which means the MCrypt extension library The installation was successful. If it still cannot be loaded, try changing the extension<strong> added in php.ini to: </strong><code>extension

<span <code>extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt<strong>.</strong>so</code></span>>

.6.3 and 10.8.1. You can also refer to "Mac OS , and phpMyAdmin(1)” and “Mac OS X Leopard: Configuring Apache, PHP, SQLite, MySQL, and phpMyAdmin(2)”.

In fact, you can also use third-party integration solutions such as XAMPP or MacPorts to achieve simple installation and use.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440155.htmlTechArticle. This article takes Mac OS X 10.6.3 and 10.8.1 as examples. The main content includes: ! page, which is located under /Library (resource library)/WebServer/Documents/, which is the default root directory of Apache. ...

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
ip与mac绑定什么意思ip与mac绑定什么意思Mar 09, 2023 pm 04:44 PM

ip与mac绑定是指将特定的IP地址与特定的MAC地址关联起来,使得只有使用该MAC地址的设备才能够使用该IP地址进行网络通信。ip与mac绑定可以防止被绑定的主机的IP地址不被假冒,前提条件:1、MAC地址是唯一的,并且不可假冒;只能绑定与路由器直接相连的网络上的主机(也就是主机的网关在路由器上)。

mac版下载是什么意思mac版下载是什么意思Mar 06, 2023 am 09:52 AM

mac版下载的意思是当软件在选择安装时,选择MAC版下载;Windows版和MAC版是两个不同的操作系统,所以大多数软件在选择安装的同时需要选择Windows版还是MAC版。

CS玩家的首选:推荐的电脑配置CS玩家的首选:推荐的电脑配置Jan 02, 2024 pm 04:26 PM

1.处理器在选择电脑配置时,处理器是至关重要的组件之一。对于玩CS这样的游戏来说,处理器的性能直接影响游戏的流畅度和反应速度。推荐选择IntelCorei5或i7系列的处理器,因为它们具有强大的多核处理能力和高频率,可以轻松应对CS的高要求。2.显卡显卡是游戏性能的重要因素之一。对于射击游戏如CS而言,显卡的性能直接影响游戏画面的清晰度和流畅度。建议选择NVIDIAGeForceGTX系列或AMDRadeonRX系列的显卡,它们具备出色的图形处理能力和高帧率输出,能够提供更好的游戏体验3.内存电

mac鼠标滚轮相反怎么办mac鼠标滚轮相反怎么办Mar 16, 2023 pm 05:44 PM

mac鼠标滚轮相反的解决办法:1、打开mac电脑,点击屏幕的苹果标志,然后选择“系统偏好设置”;2、在“系统偏好设置”窗口中,选择“鼠标”;3、在“鼠标”窗口中,将“滚动方向:自然”前面的勾去掉即可。

修复文件共享在 MacOS Ventura 中不起作用修复文件共享在 MacOS Ventura 中不起作用Apr 13, 2023 am 11:34 AM

修复 SMB 文件共享在 MacOS Ventura 中不起作用的问题从  Apple 菜单打开 Mac 上的“系统设置”应用程序转到“常规”,然后转到“共享”找到“文件共享”的开关并将其关闭通过转到  Apple 菜单并选择重新启动来重新启动 Mac重新启动后,返回共享系统设置面板并将“文件共享”重新设置为打开位置像往常一样恢复文件共享,它应该按预期工作如果 MacOS Ventura Mac 与另一台 Mac 或设备之间的文件共享突然再次停止工作,您可能需要在几天后或随机重复此过程。

如何防止 Mac 在显示器关闭时进入睡眠状态 (MacOS Ventura)如何防止 Mac 在显示器关闭时进入睡眠状态 (MacOS Ventura)Apr 13, 2023 pm 12:31 PM

显示器关闭时如何防止 Mac 休眠如果您希望 Mac 显示器能够在整个计算机不进入睡眠状态的情况下关闭,请在此处进行适当的设置调整:下拉  Apple 菜单并转到“系统设置”转到“显示”点击“高级...”切换“防止显示器关闭时电源适配器自动休眠”的开关现在 Mac 显示屏可以关闭,同时防止 Mac 本身进入睡眠状态。这可能主要与 Mac 笔记本电脑用户相关,但即使是那些没有 MacBook 的用户也可能会发现该功能很有用。

mac克隆是什么意思mac克隆是什么意思Jan 31, 2023 am 10:33 AM

mac克隆全称mac地址克隆,是固化在网卡上串行EEPROM中的物理地址,通常有48位长。mac克隆一般应用在路由器上,用户在用电脑直接拨号上网,后来又加了个路由器,通过路由器来实现多台电脑同时上网,这时要用到mac地址克隆了,就是把当前的电脑的mac地址克隆到路由器中去,因为运营商是把你的电脑mac地址绑定你的账号的,所以得克隆以后才能用。

mac的shift键是哪个键mac的shift键是哪个键Mar 13, 2023 pm 02:20 PM

mac的shift键是fn键上方、caps lock键下方的一个键,该键在键盘最左侧,由右下往上数第2个键;shift键是键盘中的上档转换键,可以通过“Ctrl+Shift”组合键来切换输入法。

See all articles

Hot AI Tools

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.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),