-
-
Save anithegregorian/ddf62784ceb33ac6aad91aae0f77d5fb to your computer and use it in GitHub Desktop.
Revisions
-
pwenzel revised this gist
Sep 3, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,11 +49,13 @@ Create a new site with custom virtual host directives: #### Optional: Apache Without VirtualHostX You can achieve the above without VirtualHostX by [manually editing](http://davidwalsh.name/create-virtual-host): /private/etc/hosts /private/etc/apache2/httpd.conf /private/etc/apache2/extra/httpd-vhosts.conf #### MySQL With a MySQL client such as [Sequel Pro](http://www.sequelpro.com), connect to MySQL at `127.0.0.1` with the username `root` and no password. [Change the password](http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-generic) if you like. -
pwenzel revised this gist
Sep 3, 2014 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using [Homebrew](http://brew.sh) to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts. [VirtualHostX](https://clickontyler.com/virtualhostx/) is a convenient way to manage development sites, but not required. @@ -28,7 +28,8 @@ This should yield `PHP 5.6.0 (cli)`. Edit your `~/.bash_profile` by adding the line: alias php='/usr/local/Cellar/php56/5.6.0/bin/php' alias php56='/usr/local/Cellar/php56/5.6.0/bin/php' Test your PHP alias: php --version -
pwenzel revised this gist
Sep 3, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -66,6 +66,5 @@ Edit `/private/etc/apache2/httpd.conf`: User your_mac_username Group staff -
pwenzel revised this gist
Sep 3, 2014 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,4 +55,17 @@ You can achieve the above without VirtualHostX by manually editing: /private/etc/apache2/extra/httpd-vhosts.conf #### MySQL With a MySQL client such as [Sequel Pro](http://www.sequelpro.com), connect to MySQL at `127.0.0.1` with the username `root` and no password. [Change the password](http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-generic) if you like. #### Permissions Enable write permissions for Apache by changing its User and Group settings. Edit `/private/etc/apache2/httpd.conf`: User your_mac_username Group staff # With earlier versions such as Leopard, capitalise staff to Staff -
pwenzel revised this gist
Sep 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ This guide shows how to roll PHP and MySQL using OSX's built-in Apache, using [Homebrew](http://brew.sh) to install necessary components. Using this strategy, you can use different versions of PHP for certain virtual hosts. [VirtualHostX](https://clickontyler.com/virtualhostx/) is a convenient way to manage development sites, but not required. #### Install PHP and MySQL with Homebrew -
pwenzel revised this gist
Sep 2, 2014 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,14 @@ I use [VirtualHostX](https://clickontyler.com/virtualhostx/) as a convenient way brew install mysql mysql.server start *The mcrypt extension is required for some PHP frameworks such as [Laravel](http://laravel.com/docs/installation).* Optional: Install other extensions or versions of PHP brew install php56-xdebug brew install php55 brew install php55-mcrypt #### Configure PHP Test PHP: -
pwenzel revised this gist
Sep 2, 2014 . 1 changed file with 26 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,31 @@ This guide shows how to roll PHP and MySQL using OSX's built-in Apache, using [Homebrew](http://brew.sh) to install necessary components. Using this strategy, you can use different versions of PHP for certain virtual hosts. I use [VirtualHostX](https://clickontyler.com/virtualhostx/) as a convenient way to manage all of my development sites, but it's not required. #### Install PHP and MySQL with Homebrew brew update brew install php56 brew install php56-mcrypt brew install mysql mysql.server start #### Configure PHP Test PHP: /usr/local/Cellar/php56/5.6.0/bin/php --version This should yield `PHP 5.6.0 (cli)`. Edit your `~/.bash_profile` by adding the line: alias php='/usr/local/Cellar/php56/5.6.0/bin/php' Test your PHP alias: php --version This should again yield `PHP 5.6.0 (cli)`. #### VirtualHostX @@ -26,6 +38,13 @@ Create a new site with custom virtual host directives: DirectoryIndex index.html index.htm index.php #### Optional: Apache Without VirtualHostX You can achieve the above without VirtualHostX by manually editing: /private/etc/hosts /private/etc/apache2/httpd.conf /private/etc/apache2/extra/httpd-vhosts.conf #### MySQL With a MySQL client such as [Sequel Pro](http://www.sequelpro.com), connect to MySQL at localhost with the username `root` and no password. [Change the password](http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-generic) if you like. -
pwenzel revised this gist
Sep 1, 2014 . 1 changed file with 13 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,34 +1,31 @@ #### Run the following Homebrew commands to install PHP and MySQL brew update brew install php56 brew install php56-mcrypt brew install mysql mysql.server start #### Test and configure PHP * Run `/usr/local/Cellar/php56/5.6.0/bin/php --version` → should yield `PHP 5.6.0 (cli)` * edit `~/.bash_profile` or `~/.config/fish/fish.config` * add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` * Run `php --version` → should yield `PHP 5.6.0 (cli)` #### VirtualHostX Configure [VirtualHostX](https://clickontyler.com/virtualhostx/) to use Built-in Apache instead of MAMP. Create a new site with custom virtual host directives: LoadModule php5_module /usr/local/Cellar/php56/5.6.0/libexec/apache2/libphp5.so AddType application/x-httpd-php .php DirectoryIndex index.html index.htm index.php #### MySQL With a MySQL client such as [Sequel Pro](http://www.sequelpro.com), connect to MySQL at localhost with the username `root` and no password. -
pwenzel revised this gist
Sep 1, 2014 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,10 +20,15 @@ add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` **VirtualHostX** Configure VirtualHostX to use Built-in Apache instead of MAMP. Create a new site with custom VirtualHost directives: LoadModule php5_module /usr/local/Cellar/php56/5.6.0/libexec/apache2/libphp5.so AddType application/x-httpd-php .php DirectoryIndex index.html index.htm default.htm index.php **Sequel Pro** Connect to MySQL at localhost with the username `root` and no password. -
pwenzel revised this gist
Sep 1, 2014 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,3 +16,14 @@ add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` `php --version` (should yield `PHP 5.6.0 (cli)`) **VirtualHostX** Create new site with custom VirtualHost directives: #LoadModule php5_module /usr/libexec/apache2/libphp5.so LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so AddType application/x-httpd-php .php DirectoryIndex index.html index.htm default.htm index.php -
pwenzel revised this gist
Sep 1, 2014 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,18 @@ **Run the following Homebrew commands to install PHP and MySQL:** brew update brew install php56 brew install mysql mysql.server start **Then test and configure PHP:** `/usr/local/Cellar/php56/5.6.0/bin/php --version` (should yield `PHP 5.6.0 (cli)`) edit `~/.config/fish/fish.config` or `~/.bash_profile` add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` `php --version` (should yield `PHP 5.6.0 (cli)`) -
pwenzel revised this gist
Sep 1, 2014 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,14 @@ Run the following Homebrew commands to install PHP and MySQL brew update brew install php56 brew install mysql mysql.server start Then test and configure PHP: `/usr/local/Cellar/php56/5.6.0/bin/php --version` (verify installation version) edit `~/.config/fish/fish.config` or `~/.bash_profile` add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` `php --version` (should yield `PHP 5.6.0 (cli)`) -
pwenzel created this gist
Sep 1, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Run the following Homebrew commands to install PHP and MySQL # brew update # brew install php56 # brew install mysql # mysql.server start test with `/usr/local/Cellar/php56/5.6.0/bin/php --version` (test) edit `~/.config/fish/fish.config` or `~/.bash_profile` add the line `alias php='/usr/local/Cellar/php56/5.6.0/bin/php'` test with `php --version` (should yield `PHP 5.6.0 (cli)`)