#Merendella at Arena Vescovato – View on Path.
#Merendella at Arena Vescovato – View on Path.
awesomepeoplehangingouttogether:
Serge Gainsbourg and Ray Charles
Prerequisite:
All you need is a Mac with Lion installed (or other).
Note: if you activate “Web Server” on your mac, Apache will run. But I will also describe how to install MySQL, activate PHP and configure Apache.
Step 1: PHP:
By default, PHP is installed on your mac, but not activated. To activate it:
Copy the httpd.conf.default to httpd.conf in /etc/apache2/ :
cd /etc/apache2
sudo cp httpd.conf.default httpd.conf
Then edit httpd.conf and uncomment this line:
#LoadModule php5_module libexec/apache2/libphp5.so
Step 2: MySQL
Install MySQL (download it here)
Once installed, you can set a root password:
/usr/local/mysql-5.5.18-osx10.6-x86_64/bin/mysqladmin -u root password NewPassword
Step 3 : Apache configuration
If the default configuration don’t fit you, you can edit it:
sudo emacs /etc/apache2/httpd.conf
You can add, for example:
<VirtualHost *>
UseCanonicalName On
ServerName example.com
DocumentRoot /Users/denis/Documents/eip/public/
</VirtualHost>
<Directory /Users/denis/Documents/eip>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
In this case don’t forget to add
127.0.0.1 example.com
in your /etc/hosts file
Note:
- By default the apache log is here:
tail -f /var/log/apache2/error_log
- I use <?=$var?> in my php code, in this case short_open_tag should be at On in the php.ini (/etc/php.ini)
- To run mysql in command line:
/usr/local/mysql-5.5.18-osx10.6-x86_64/bin/mysql -h localhost -u root -p
- I had some right issues, in this case you can follow this topic:

Erin Everhart is the director of web and social media marketing at the digital marketing and web design company, 352 Media Group. Connect with her on Twitter @erinever. Google’s search results aren’t what they used to be. Need proof? Just look at its results page. No longer solely comprise…