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
Add Permission: Chmod-r 777/library/webserver/documents
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