Instead of relying on MAMP, XAMP etc., you can configure your Mac to use the latest version of PHP.
MAMP and XAMP doesn’t come with the latest version of php and hence this exercise.
The steps involved are that we need to install:
1. Install Xcode
2. Install XCode Command line tools
3. Install XQuartz
4. Install Homebrew
5. brew install libjpeg
6. brew install pcre
7. brew install libxml2
8. brew install mcrypt
9. brew install libpng
mcrypt is needed for Laravel Framework
To support internationalization, download ICU from ICU-Project.org
tar xzvf icu4c-4_8_1-src.tgz
sudo make install
Run the following:
I got two errors:
1. configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
To resolve the error you need to compile IMAP.
So I did the following steps:
1. Downloaded the latest version of IMAP from http://www.washington.edu/imap/
2. make osx EXTRACFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
3. sudo mkdir /usr/local/include/
4. sudo cp c-client/*.h /usr/local/include/
5. sudo mkdir /usr/local/lib/
6. sudo cp c-client/*.c /usr/local/lib
7. sudo cp c-client/c-client.a /usr/local/lib/libc-client.a
2. After that I got another error
configure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
The error was due to the value of “–with-icu-dir=/usr/” The ICU got installed in /usr/local Directory. So after changing the value to “–with-icu-dir=/usr/local”
The configure command was successful.
Then I ran make and make install for the successful php install/upgrade.