-
Notifications
You must be signed in to change notification settings - Fork 0
Install PHP environment for Mac
Vu Van Ly edited this page Jun 19, 2015
·
15 revisions
##Setup virtual host http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-10-yosemite/ ##Import database
mysql -uroot
create database balinese;
use balinese;
source ~/Downloads/balinese.sql
##Config access mode: Inside source folder, run command:
sudo chmod -R 777 data/ hiddendata/ logs/ tmp/
In file /etc/apache2/httpd.conf, uncomment these below lines:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
##Fix error: Forbidden access:
In file /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin vanly.se05@gmail.com
DocumentRoot "/Library/WebServer/Documents/rakujuku/for_broardcast_20150319/src/htdocs"
ServerName RakuJuku
ServerAlias rakujuku.com
ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
<Directory "/Library/WebServer/Documents/rakujuku/for_broardcast_20150319/src/htdocs">
Allow from all
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
sudo nano /etc/hosts
add add
127.0.0.1 domain.com
brew install homebrew/php/php53
httpd -v
php -v
mysql -v
sudo apachectl start
sudo apachectl restart
sudo apachectl stop
mysql.server start #start server mysql
mysql -uroot # connect mysql
change host from localhost to 127.0.0.1
Try DISABLE KEYS or
SET FOREIGN_KEY_CHECKS=0;
make sure to
SET FOREIGN_KEY_CHECKS=1;
after.