Today I started to dig into the tons of unread mails I received this month. My first priority was to fix 2 formulas I've submitted to the homebrew project (one is for the eZ Components, the other one to be able to install php-intl which is a requirement for Symfony2 developments).
But, I discovered that homebrew people decided to stop maintaining PHP formulas in the main repository. They are not PHP developers and can't have a good sight on what they review and pull. Well, homebrew-php is the new repository to PHP-related formulas and adamv told me that multi-repositories management will be handled in a short term. So that's quite a good news !
Before doing anything regarding the formulas I've submitted, I was curious to install PHP 5.3.10 using homebrew and see how it works. This blog post is about that.
Say a prayer
Since PHP are not handler in the homebrew default repository you need to explicitly give the path to the formula you wan to install. In my case, I have a local clone of homebrew-php so I can simply do this :
$ brew install ~/Development/git-clones/homebrew-php/Formula/php.rb
As we can see in the formula code, the installer supports a few options :
['--with-mysql', 'Include MySQL support'], ['--with-mariadb', 'Include MariaDB support'], ['--with-pgsql', 'Include PostgreSQL support'], ['--with-mssql', 'Include MSSQL-DB support'], ['--with-unixodbc', 'Include unixODBC support'], ['--with-cgi', 'Enable building of the CGI executable (implies --without-apache)'], ['--with-fpm', 'Enable building of the fpm SAPI executable (implies --without-apache)'], ['--without-apache', 'Build without shared Apache 2.0 Handler module'], ['--with-intl', 'Include internationalization support'], ['--with-imap', 'Include IMAP extension'], ['--without-readline', 'Build without readline support'], ['--with-gmp', 'Include GMP support'], ['--with-suhosin', 'Include Suhosin patch']
As far as I'm concerned, I've installed it with mysql and suhosin support.
$ brew install ~/Development/git-clones/homebrew-php/Formula/php.rb --with-mysql --with-suhosin
Simply edit your default configuration file in /etc/apache2/httpd.conf, find the line regarding php5_module and change the path to the .so file
LoadModule php5_module /usr/local/Cellar/php/5.3.10/libexec/apache2/libphp5.so
You might have noticed that the configuration file now used by your php installation is not the one located in /private/etc/php.ini anymore. Just compare what you had in that file and report it in the one used by the homebrew version (which is in /usr/local/etc/php.ini)
If you want to use the 5.3.10 version of your freshly installed PHP-CLI, then you need to use /usr/local/bin/php
$ php -v PHP 5.3.8 with Suhosin-Patch (cli) (built: Nov 15 2011 15:33:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
$ /usr/local/bin/php -v PHP 5.3.10 with Suhosin-Patch (cli) (built: Mar 7 2012 18:14:58) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
If using eZ Publish, here's the checklist :
Debian (2) ezlupdate (1) Développement (1) phpmyadmin (1) PHP (2) Github (1) Git (2) etckeeper (1) infrastructure (1) Puppet (1) Pin (1) multi-lingual (1) Apt-get (1) Réseau (1) Virtualisation (1) Blog (1) Dedibox (1) Perso (1) Bootstrap (1) Système (1) Pro (1) Monitoring (1) VMware vSphere Hypervisor (ESXi) (1) Note2self (2) Serveur (3) Déploiement (3) Backup (1) Time Machine (1) MySQL (1) homebrew (2) eZ Publish (4) Mac OS X (2)
7 years, roaming in the IT world, working on different project sizes, different project types and using a lot of technologies and solutions that are usually used on LAMP projects.
My last job at eZ Systems (the company behind eZ Publish) as Technical Accounter Manager and Senior Consultant, was very formative since it gave me the opportunity to work for prestigious and high-end customers
I can now operate as a freelance for both customers and IT companies, always keeping in mind everybody's needs.
Get in touch with me using this form .