By default this version of homebrew has both Apache and MySQL support so we only need to add International support option.
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew update
Removed ~/.pearrc
Installed XQuartz-2.7.4.dmg
brew install php55
brew install php55-intl
Install log: https://gist.github.com/7hunderbird/dcdd73e71daa8b141f33
- https://github.com/josegonzalez/homebrew-php/issues/401 # needed for --homebrew-apxs
subl /usr/local/etc/php/5.5/php.ini
date.timezone = America/Denver
brew tap djl/homebrew-apache2
brew install djl/apache2/apache24
Install log: https://gist.github.com/7hunderbird/0b7d974bfde23098064c
subl /usr/local/etc/apache2/httpd.conf
LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so
sudo apachectl start
sudo apachectl restart
ServerName localhost:80
chmod -R ug+w /usr/local/Cellar/php55/5.5.3/lib/php
pear config-set php_ini /usr/local/etc/php/5.5/php.ini
mkdir -p /usr/local/var/apache2/htdocs/www/example.com/public_html
chown -R daemon:daemon /usr/local/var/apache2/htdocs/www/example.com/public_html
chmod -R 755 /usr/local/var/apache2/htdocs/www/
subl /usr/local/var/apache2/htdocs/www/example.com/public_html/index.html # create a default page
<html>
<head>
<title>www.example.com</title>
</head>
<body>
<h1>Success: You Have Set Up a Virtual Host</h1>
</body>
</html>
mkdir -p /usr/local/etc/apache2/sites-available/
subl /usr/local/etc/apache2/sites-available/example.com
<VirtualHost *:80>
ServerAdmin tyler.bird@gmail.com
DocumentRoot "/usr/local/var/apache2/htdocs/www/example.com/public_html"
ServerName example.com
ErrorLog "/usr/local/var/log/apache2/example.com-error_log"
CustomLog "/usr/local/var/log/apache2/example.com-access_log" common
</VirtualHost>
brew install mysql
Install log: https://gist.github.com/7hunderbird/47b1e7c789d69f199932
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
mysql.server start
mysql.server stop
From here down this is stuff I'm not using yet because I am not super advanced into PHP yet. But I'll hold on to it until later.
if you don't have autoconf (Xcode 4.3) install autoconf
brew install autoconf
pecl install xdebug apc
and change
extension=xdebug.so
to
zend_extension="$fullpath/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_autostart = 1
pear config-set auto_discover 1
pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox
this will install:
PHP_Depend, PHP_CodeSniffer, File_Iterator Text_Template, PHP_Timer, YAML, Console_CommandLine, Log, PHP_TokenStream, Base, PHP_PMD, PHP_CodeBrowser, PHP_CodeCoverage, PHPUnit_MockObject, ConsoleTools, PHPUnit, phpcpd, phploc, phpqatools
pear channel-discover pear.phing.info
pear config-set preferred_state beta
pear install phing/phing
pear config-set preferred_state stable
- https://github.com/josegonzalez/homebrew-php
- https://github.com/djl/homebrew-apache2
- http://chielkunkels.com/setting-up-a-dev-environment-on-osx.html
- http://www.technosophos.com/content/debugging-your-php-code-xdebug-mamp-textmate-and-macgdbp-support
- http://blog.stevenlu.com/2012/10/12/moving-away-from-mamp-and-into-homebrew/
- http://php.net/manual/en/function.date-default-timezone-set.php