install composer via brew :D

ketika akan menginstall yii2 di mac osx yang memakai composer , kemudian muncul error sebagai berikut :

 brew install composer PHP Warning:  Module ‘curl’ already loaded in Unknown on line 0 composer: Missing PHP53, PHP54, PHP55 or PHP56 from homebrew-php.


kemudian saya mengatasi nya dengan browsing di google dan menemukan source yang memberikan tulisan sebagai berikut :

brew install php56

kemudian ternyata masih belum bisa memakai composer 🙁

masih harus doing this ->

curl -sS | php
mv composer.phar /usr/local/bin/composer

dan somehow 
tidak bisa memakai php composer.phar jadi hanya memakai composer saja 😀

php extension untuk mac osx maverick

The PHP version that comes bundled with OS X doesn’t include PostgreSQL. You’ll have to compile the extension yourself. Here are some instructions:

  1. Find your version of PHP: php -v.
  2. Download the version of PHP that matches yours: curl -O (This example downloads PHP 5.3.3 but this must match your version)
  3. Extract the archive you downloaded: tar -xzvf php-5.3.3.tar.gz
  4. Change to the PostgreSQL’s extension directory: cd php-5.3.3/ext/pgsql/
  5. Type phpize.
  6. Type ./configure.
  7. Type make.
  8. Type sudo make install.
  9. Add the extension to you php.ini file by adding (You may already have done this)
  10. Restart Apache.

Update for OS X Mountain Lion Apple has removed autoconf from the newer versions of XCode so the procedure above will fail at #5. To solve that problem:

  1. Type /usr/bin/ruby -e "$(/usr/bin/curl -fksSL". *->kecuali yang ini tidak bisa di pakai
  2. Type sudo chown -R $USER /usr/local/Cellar.*->ini juga gak perlu
  3. Type brew update.
  4. Type brew install autoconf.

That should install autoconf and allow you to install the module using the instructions above.

*tutorial di atas juga dapat di gunakan untuk curl ataupun extension yang lain untuk php extension ketia bermasalah


**note untuk install mcrypt harus install terlebih dahulu libmcrypt yang bisa di download di sini

  1. cd libmcrypt-2.5.8
  2. ./configure
    sudo make install

kalau sudah baru lanjutkan di php/ext/mcrypt

phpize ./configure dan seterusnya