Configure the Apache + PHP + mysql_php tutorial in Mac OS X

Source: Internet
Author: User
Tags mcrypt

< span="">

。 This article takes Mac OS X 10.6.3 and 10.8. 1 for example. The main contents include:

< span="">

!” Page, which is located under/library (Resource Library)/webserver/documents/, which is the default root directory for Apache .

. It is important to note that when Mac OS x cancels "Web share (Web sharing)" in 10.8, it also removes the "/users/[User name]/sites/" directory, so . Access to "http://[local ip]/~[User name" in 8 shows "403 Forbidden", but http://[local ip]/still has access to . to "system Preferences", "Security", "Firewall (Firewall)", turn on the firewall, and in the "Firewall options (Firewall options)" Check the " Organize all incoming connections (block all incoming connections) ". The can also be set httpd.conf to allow only localhost and 127.0 . 0.1 access to "/library (Resource Library)/webserver/documents/".


  
   
    
       ......    #    # Controls who can get stuff from this server
   
    .    #    Order allow,deny    #Allow from all    Allow from 127
   
    .0.0
   
    .1    Allow from localhost 
  
   

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

Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' ”,这应该是某种情况下导致/usr/local/mysql/data的宿主发生了改变,只需要运行“sudo chown -R mysql /usr/local/mysql/data”即可

.0. 0.1, because PHP by default when connecting to find /var/mysql/mysql.sock , but Mac version of MySQL changed the file location, put in/tmp . The approach is to modify php.ini as follows:

mysql.default_socket = /tmp/mysql.sock

。 Being able to manage MySQL with phpMyAdmin is a very effective way to test the previous steps.

Extended

。 But the installation under Mac OS X is less friendly, as follows:

http://localhost/phpmyadmin时,会发现“无法加载 mcrypt 扩展,请检查您的 PHP 配置”提示没有了,这就表示MCrypt扩展库安装成功了。如果还不能加载,尝试把php.ini中的加入的extension修改为:

extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so

.8 & 10.7 Development Server and adding MCRYPT to your OSX Lion PHP install

< span="">

.6.3 and 10.8.1 Zhongyuan support the way to implement the configuration can also refer to "Mac OS X Leopard: Configure Apache, PHP, SQLite, MySQL, and PhpMyAdmin (one)" and "Mac OS X Leopard: Configuration A Pache, PHP, SQLite, MySQL, and PhpMyAdmin (ii) ". in fact, it is possible to use XAMPP or MacPorts as a third-party integration solution for simple installation and use .

< span="">

http://www.bkjia.com/PHPjc/440155.html www.bkjia.com true http://www.bkjia.com/PHPjc/440155.html techarticle . This document is based on Mac OS X 10.6.3 and 10.8. 1 for example. The main contents include:! Page, which is located under/library (Resource Library)/webserver/documents/, which is the default root directory for Apache. ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.