Questions about permissions for Apache server that comes with your Mac

Source: Internet
Author: User

Recently on the Mac with the Thinkphp development project, and then was written on the windows, directly installed a WAMP package, now with the Mac, and then the Mac comes with PHP and Apache, but due to its strict authority mechanism, There is no way to write thinkphp dynamically generated files, causing me to not run as long as the database-related code. And I tried to give Apache the root path plus read and write permissions, but still an error message, the errors are as follows

Do not know if there is a great God encountered similar situation, and then I have installed MySQL, do not know whether to install Mamp this package will be in conflict with the original APACHE+PHP+MYSQL environment ( should not, Mamp is only a separate environment, but still to check ) Should be the question of read and write permissions, do not know whether to change Apache configuration files or something, please greatly answer

Reply content:

Recently on the Mac with the Thinkphp development project, and then was written on the windows, directly installed a WAMP package, now with the Mac, and then the Mac comes with PHP and Apache, but due to its strict authority mechanism, There is no way to write thinkphp dynamically generated files, causing me to not run as long as the database-related code. And I tried to give Apache the root path plus read and write permissions, but still an error message, the errors are as follows

Do not know if there is a great God encountered similar situation, and then I have installed MySQL, do not know whether to install Mamp this package will be in conflict with the original APACHE+PHP+MYSQL environment ( should not, Mamp is only a separate environment, but still to check ) Should be the question of read and write permissions, do not know whether to change Apache configuration files or something, please greatly answer

    1. Add Permission: Chmod-r 777/library/webserver/documents

    2. It is also possible that the *unix system is case-sensitive. MAC file systems are not differentiated by default, but what if they were formatted as case-sensitive ...

In addition to the command line practice, you can also right-click on the folder to open the "Introduction" under the Adjust permissions of the place

Can be installed MAMP , using MAMP its apache MySQL ownphp
Theoretically, it is a feasible method and there is no guarantee that there will be no surprises.

Current solutions to this problem:

sudo chown -R :_www /Library/WebServer        # 递归给目录设置属主为`_www`sudo chmod -R g+rw /Library/WebServer          # 递归给目录读和写权限sudo apachectl restart                        # 重启apache
  • 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.