IMPORTANT NOTICE (updated June 2nd 2011)
A stackoverflow user named “Psychonetics” has left a comment that the compiled intl extension does not work properly. I have yet the time to verify it. If you have an intel-based mac, you can try Psychonetics’s solution, which is to install and use Zend Server CE instead. If you still prefer MAMP, he suggested to extract the intl.so from Zend Server CE, which should be found under the directory /usr/local/zend/lib/php_extensions after installation, and copy it to MAMP directory /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/.
If anyone has found a solution to compile intl extension for MAMP properly, kindly leave a comment here.
While trying out Symfony2 Standard Edition, the configuration check recommended to install and enable the intl extension, which does not come with the latest version of MAMP.
Below are the steps to compile the intl extension for MAMP on Leopard:
Step 0 (SNOW LEOPARD ONLY): Instruct the compiler to compile in both 32 and 64 bit.
> MACOSX_DEPLOYMENT_TARGET=10.6 > CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” > CCFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” > CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” > LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load” > export MACOSX_DEPLOYMENT_TARGET CFLAGS CCFLAGS CXXFLAGS LDFLAGS
Step 1: Download, compile and install ICU source code from International Components for Unicode (I used the version 4.6.1). Extract the archive and run the following in terminal:
> cd ~/Downloads/icu/source > ./runConfigureICU MacOSX > make > make install
Step 2: Download and extract php source code archive in Downloads folder. The current latest version 1.9.5 of MAMP comes with php version 5.3.5. The source code can be obtained from the PHP’s Unsupported Historical Releases page. In order to compile intl extension, php source code has to be configured to generate some necessary files. After that, intl extension can be “configure, make and make install”. The following are the list of commands to be run in the terminal:
> export PATH=/Applications/MAMP/bin/php5.3/bin/:$PATH > cd /Applications/MAMP/bin/php5.3 > mkdir include > mv ~/Downloads/php-5.3.5 include/php > cd include/php > ./configure > cd ext/intl > phpize > ./configure > make > make install
Step 3: Edit php.ini (/Applications/MAMP/conf/php5.3/php.ini) to add the line extension=intl.so and restart apache.
NOTE: incorrect. See above for updated Step 0 for Snow Leopard.
To compile on Snow Leopard (yet to be tested personally), instruct the compiler to compile in 32 bit or both 32 and 64 bit, by running:
./configure MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load”
Aaron
April 15, 2011
Thanks man, exactly what I needed! You rock!
szemian
April 15, 2011
Glad it helps!
Lars
April 22, 2011
Thanks a lot! Saved me a lot of time! I subscribed your blog in case that you continue to blog about Symfony2 related topics. But don’t feel under pressure now
szemian
April 23, 2011
Hi Lars,
I posted the article as a self reminder, but I’m glad the post has also saved you some time!
Thanks for subscribing, you are my first subscriber!
I realized writing article helps to learn and remember the topic better, but it is quite time consuming. I will post more when there is something worthwhile to share.
Web Hosting
May 4, 2011
Unfortunately trying out your configure options in the Note for Snow Leopard doesn’t work. Here is the output that I get:
configure: warning: MACOSX_DEPLOYMENT_TARGET=10.6: invalid host type
configure: warning: CFLAGS=-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp: invalid host type
configure: error: can only configure for one host and one target at a time
Running Snow Leopard 10.6.7 here with MAMP
If I just use your procedure mentioned for leopard I get the following PHP error:
PHP Warning: PHP Startup: Unable to load dynamic library ‘/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so’ – dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so, 9): no suitable image found. Did find:
/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so: mach-o, but wrong architecture in Unknown on line 0
Thanks for the help
szemian
May 4, 2011
Hi,
Try to compile again without -arch x86_64 to see if it works. Sorry but I do not have a snow leopard installation right now to try it.
Thanks and please le me know.
Web Hosting
May 4, 2011
Thanks for your fast answer! I now tried with the following configure:
./configure MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=”-arch i386 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -g -Os -pipe” CXXFLAGS=”-arch i386 -g -Os -pipe” LDFLAGS=”-arch i386 -bind_at_load”
and now get this error message:
configure: warning: MACOSX_DEPLOYMENT_TARGET=10.6: invalid host type
configure: warning: CFLAGS=-arch i386 -g -Os -pipe -no-cpp-precomp: invalid host type
configure: error: can only configure for one host and one target at a time
You might be also interested to see the output of uname -a:
Darwin macpro2.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:16:10 PST 2011; root:xnu-1504.9.37~1/RELEASE_X86_64 x86_64
Hope this helps…
szemian
May 4, 2011
Try with the following multiple steps and then recompile everything (icu and intl) instead to see if it works:
> MACOSX_DEPLOYMENT_TARGET=10.6
> CFLAGS=”-arch i386 -g -Os -pipe -no-cpp-precomp”
> CCFLAGS=”-arch i386 -g -Os -pipe”
> CXXFLAGS=”-arch i386 -g -Os -pipe”
> LDFLAGS=”-arch i386 -bind_at_load”
> export MACOSX_DEPLOYMENT_TARGET CFLAGS CCFLAGS CXXFLAGS LDFLAGS
Please let me know the result. If it does not work, I might be able to try to compile it on Snow Leopard later this evening.
Web Hosting
May 4, 2011
Using this method didn’t make configure complain so I could compile PHP again but now I get the following error message from PHP:
PHP Warning: PHP Startup: Unable to load dynamic library ‘/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so’ – dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so, 9): Symbol not found: __ZTVN6icu_4613FieldPositionE
Referenced from: /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so
Expected in: flat namespace
in /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so in Unknown on line 0
No rush though, if you can have a try sometime from Snow Leopard that would be great and I guess easier for you
szemian
May 4, 2011
You only recompile intl extension? In theory, you might have to recompile ICU then php extension again.
Web Hosting
May 4, 2011
Excellent remark, yes indeed! So now I tried to recompile everything (including ICU) using all the flags as env variables and it worked! Well done and many thanks to you!
szemian
May 4, 2011
Glad it finally works!
Juanda
May 14, 2011
Thanks a lot!
Furet
May 18, 2011
It works, thinks a lot (with snow leopard).
szemian
May 18, 2011
Glad it works for you on snow leopard too!
Furet
May 18, 2011
thanks a lot (sorry for my english)
Rivers
June 26, 2011
bash: i386: command not found
when trying to enter:
CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
im running snow leopard (10.6.8)
please help :<
Rivers
June 26, 2011
it was because of the copied “.
now i have the following problem after the second ./configure in step 2:
checking for location of ICU headers and libraries… not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
Rivers
June 26, 2011
nevermind.. “sudo” was the magic command here. works
)
thanks for the guide, its great!
szemian
June 27, 2011
Hi Rivers, glad you manage to compile the extension, but did the extension passed the test suite?
To test the extension, run the following command in the extension directory (should be /Applications/MAMP/bin/php5.3/include/php/ext/intl)
> TEST_PHP_EXECUTABLE=/Applications/MAMP/bin/php5.3/bin/php php run-tests.php tests
On my old mac with Leopard it fails 24 out of 82 tests.
RJ
July 12, 2011
I’ve had the similar issues. I am able to compile it and the lib is loaded by php, however only functions like NumberFormatter::create(..) return null, but NumberFormatter::DECIMAL returns a valid number. It’s almost like the interface is present but not the implemenation
szemian
July 13, 2011
Hi RJ, thanks for your feedback. I have the exactly the same issue.
I have also noticed that iconv extension does not work on php version 5.3 on MAMP (1.9.6.1), but works ok on php version 5.2. And since iconv is being statically compiled, I guess the only way out is to recompile everything from scratch….
Dirk-Jan de Groot
July 22, 2011
Does this work with Osx Lion (and specifically, do i need to run step 0 with Lion too?)
szemian
July 22, 2011
Hi Dirk-Jan, sorry but I have not upgraded to Lion yet, but Step 0 should be required.
Remember that I was able to compiled the extension but it fails in a lot of tests (in other words some functions of the extension are not working properly).
If you are able to compile it properly, I’ll be really grateful if you can leave a comment here.
Thanks and good luck!
Luciano Mammino
July 29, 2011
I’m under osx lion and i’ve tried to copy the file from zend server ce (here’s the intl.so file that i’ve used: http://ge.tt/88PM3N6) but the symfony 2 configurator now says:
Upgrade your intl extension with a newer ICU version (4+).
So I think we must find an updated intl.so or try the best way to compile it on osx…
szemian
July 29, 2011
Ciao Luciano, thanks for your feedback!
I still haven’t tried to compile on Lion. Too bad the updated version of MAMP still does not have intl extension included, even though it has the 64-bit version.
Adam Stacey
August 2, 2011
Awesome post!
I have just got this working on Lion using MAMP 2.0 (32bit version). I will write a blog article about it and link back to this article. Could not have done it without your help.
Legend!
szemian
August 2, 2011
Hi Adam, glad that this article was able to give you some guidelines.
Looking forward to read your article before compiling on my future Lion installation.
pdr33n (@pdr33n)
August 6, 2011
i’ve compiled the intl extension with mamp on my 10.6.8.
Darwin pedrocasado.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
i installed icu: sudo port install icu
szemian
August 6, 2011
Hi pdr33n, thanks for the feedback.
Did your compiled intl extension passed all the tests?
kotyonok11
August 11, 2011
I just installed everything, following all the instructions. Mac & MAMP never complained. When I loaded my config.php within symfony, the intl extension is still not working and i didn’t see it being shown in phpinfo() too… Is there anything missing from the instructions above?
kotyonok11
August 11, 2011
I realized I have Snow Leopard, and one part that is not clear in this article, which ./configure to use all the snow leopard additional options? There are 2 configure commands, one for php and one for the extension… I tried with the 2d configure that is for intl extension and I am still getting the same errors that intl.so cannot be found.
szemian
August 11, 2011
Hi, the snow leopard additional step is for both. As long as you keep using the same terminal session, you just have to do it once. Try to redo all the steps from the beginning.
Which MAMP version are you using? If you are using the new MAMP 2.0 64-bit version, I have not yet try it myself, but in theory you shouldn’t need the step 0.
Let me know if there is any clarification and good luck!
kotyonok11
August 11, 2011
I have Mac 10.6.8, MAMP 1.9.6 and I was trying to work with ICU 4.1.6. Okay, with the steps that you gave, the session variables definitely needed to have 64 bit flag off:
MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS=”-arch i386 -g -Os -pipe -no-cpp-precomp”
CCFLAGS=”-arch i386 -g -Os -pipe”
CXXFLAGS=”-arch i386 -g -Os -pipe”
LDFLAGS=”-arch i386 -bind_at_load”
export MACOSX_DEPLOYMENT_TARGET CFLAGS CCFLAGS CXXFLAGS LDFLAGS
Now, when i was trying to run ./configure with all the flags too, I was getting errors such as “invalid host type”. I had to run both configure without any flags after env flags.
Nevertheless, the intl.so had issues and commandline php was throwing off errors.
Well, I got frustrated and installed Zend Server Community Edition. Took the intl.iso file from /usr/local/zend/lib/php_extensions/intl.so and copied that into 2 locations under MAMP:
> cp /usr/local/zend/lib/php_extensions/intl.so /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so
> cp /usr/local/zend/lib/php_extensions/intl.so /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/intl.so
Then I restarted Apache, tried commandline php, and it worked. Now, when I loaded my symfony2… Oh well, symfony2 complained:
Upgrade your intl extension with a newer ICU version (4+).
Any recommendations?
szemian
August 12, 2011
Hi, to be honest I haven’t worked on Symfony2 for a while so I was unaware that it now requires ICU version 4+.
When I started out, ICU was still in version 3.(Opps, I must have been still dreaming when I wrote this comment, ICU was already 4.6!)Maybe you can try the newer MAMP 64-bit version to see if it works out? I might try it myself if I have some time later. Will leave you a note if there is any new finding…
kotyonok11
August 15, 2011
Hi szemian,
I found a solution. There is Moodle4Mac – basically extended MAMP (or XAMP, as they have both versions). This one is installed as MAMP same way, nothing you need to do, only to place your symfony2 into htdocs. Moodle is a course management app, and I guess you don’t really need that app, but it comes with this app (which I believe you can remove). But, the environment has already entire environment ready for symfony2 dev. Just enable APC with MAMP control widget, then there are only 2 things to correct in php.ini for symfony2: short_open_tags and and magic_quotes_gpc, and u are ready to go… I am relieved now. Thought their latest php version is 5.3.2 and I don’t mind that, as long as symfony2 works!
szemian
August 15, 2011
Hi again,
Thanks for the feedback regarding your solution! Guess it is so far the easiest solution.
I did try to compile on snow leopard last weekend but the extension still fails a lot of tests.
Dextro
August 22, 2011
I did a perfect compile with this instructions on lion. Thx!
Mike
September 25, 2011
Hey szemian, I tried to install intl on mac osx 10.7 lion.
I instructed the compiler to do:
MACOSX_DEPLOYMENT_TARGET=10.7
However it gives me “no acceptable C compiler found in $PATH” when tring to run runConfigureICU:
M-MacBook-Pro:source Mike$ ./runConfigureICU MacOSX
export CPP= CC= CXX= CPPFLAGS= CFLAGS=-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -O2 CXXFLAGS=-arch i386 -arch x86_64 -g -Os -pipe -O2 LDFLAGS=-arch i386 -arch x86_64 -bind_at_load MAKE=
Running ./configure for MacOS X (Darwin) using the GNU C++ compiler
checking for ICU version numbers… release 4.8.1, library 48.1, unicode version 6.0
checking build system type… i386-apple-darwin11.1.0
checking host system type… i386-apple-darwin11.1.0
checking target system type… i386-apple-darwin11.1.0
checking whether to build debug libraries… no
checking whether to build release libraries… yes
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in `/Users/Mike/Downloads/icu/source’:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details
./runConfigureICU: ./configure failed
Any hints?
Thanks for your good work!
Mike
szemian
September 25, 2011
Hi Mike, seems like you do not have any C compiler on your MacBook pro.
The easiest way is to install Xcode with command line tools from AppStore. It is free, but occupies quite a bit of hard disk space.
Mike
September 25, 2011
oh and I Installed gcc/x-code… so a compiler should actually be installed..
Mike
September 25, 2011
haha ok. Well I did actually. I’ll try again, hope that works. Thanks:)
szemian
September 25, 2011
Great! If you still have issue with the compiler, take a look at this question on stackoverflow:
http://stackoverflow.com/questions/6793823/configure-cant-find-c-compiler-after-os-x-lion-installation
Evan
September 29, 2011
Thanks! That worked!!!! (Snow Leopard 10.6.8 64bit)
Rivers
October 9, 2011
Hey.. it’s me again.. just got my fresh iMac with Lion.. unfortunately Zend Server CE also has a deprecated intl (getting the same thing as with MAMP).. after installing xcode with the c compiler im going to use your tutorial to create a intl.so for Zend Server CE on Lion
Hope it’s gonna work.
regards.
Lars
November 20, 2011
I’m at step 2 now but i don’t understand: “Download and extract php source code archive in Downloads folder” there’s nothing in my downloads folder… Did i do something wrong?
thnx
Lars
November 20, 2011
Never mind, i need to learn to read….
AHWEBDEV
December 5, 2011
Thank you, I used it with lion, nice tuto!
Comstar
December 15, 2011
Lion install flawless.
Tuong Le
December 20, 2011
Perfect!
wyvernwhite
February 9, 2012
Finally… this post saved my day… Thanks a lot!
EquaProduction
February 14, 2012
Today I try configure (Mac OS 10.7.3) MAMP (2.0.5) wtih intl and it’s works great.
All libraries are include in MAMP, so you can deploy the MAMP Folder on other mac.
Here’s my solution :
# Download and extract ICU source code archive in Downloads folder. ( http://site.icu-project.org/download )
# I took 4.8.1 for Unix and other platforms ( http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz )
cd icu/source
./configure –prefix=/Applications/MAMP/Library
make
sudo make install
# Download and extract the latest ( 5.3.10 ) php source code archive in Downloads folder
cd php-5.3.10/ext/intl
/usr/bin/phpize
./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/
make
# Copy intl.so into php extensions folder
cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626
# Modify php.ini
echo “extension=intl.so” >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
szemian
February 14, 2012
Hi EquaProduction, thanks for the feedback.
Did your compiled intl extension passed all the tests?
carrie
June 26, 2012
freakin’ amazing tutorial, ^5
varchar
July 24, 2012
Hi,
I’m having problems in installing intl on MAMP 1.9.5 on Lion (upgraded from Snow Leopard).
> export PATH=/Applications/MAMP/bin/php5.3/bin/:$PATH
> cd /Applications/MAMP/bin/php5.3
> mkdir include
> mv ~/Downloads/php-5.3.5 include/php
> cd include/php
> ./configure
> cd ext/intl
> phpize
> ./configure
> make ———————————> Error here
> make install
Error detail:
…
/Applications/MAMP/bin/php5.3/include/php/ext/intl/collator/collator_class.c:114:1: error:
unknown type name ‘function_entry’
function_entry Collator_class_functions[] = {
^
1 error generated.
make: *** [collator/collator_class.lo] Error 1
Any idea what this could be?
szemian
July 24, 2012
Hi varchar,
did you instruct the compiler to compile in both 32 and 64 bit?
I did not try MAMP 1.9.5 on Lion, the last one I tried was 2.0.5 on Lion.
varchar
July 25, 2012
I believe I did.
> MACOSX_DEPLOYMENT_TARGET=10.6
> CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” —-> does not work
> CCFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” —-> does not work
> CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” —-> does not work
> LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load” —-> does not work
> export MACOSX_DEPLOYMENT_TARGET CFLAGS CCFLAGS CXXFLAGS LDFLAGS
The 4 lines that didn’t work returned:
-bash: i386: command not found
I proceeded anyway and still ended up with the same error.
This guide apparently worked great for my peers. Only difference with our OS was that I upgraded to Lion from Snow Leopard.
szemian
July 25, 2012
Hi varchar, if not mistaken, it gave you error because you copy & paste the command from my article, and wordpress changed all double quotes " to curly quotes ”.
Try these commands:
> MACOSX_DEPLOYMENT_TARGET=10.7
> CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
> CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
> CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
> LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
> export MACOSX_DEPLOYMENT_TARGET CFLAGS CCFLAGS CXXFLAGS LDFLAGS
Note that I changed the deployment target to 10.7 (which is Lion).
Let me know if there is any further issue.
varchar
July 26, 2012
Hi szemian, you’re right the curly quotes caused problems but the same (make) error still happens. I ended up compiling php5.3.15 with –enable-intl and it’s now working for me.
I would prefer to work with MAMP if anyone finds a way around this but I have to be productive. I’ll see if I find a way around this and put something up here.
Still great work and I really appreciate your being responsive.
szemian
July 26, 2012
Hi varchar, glad you have found a way out. I’m with you, I use MAMP mostly because I don’t want to waste too much time compiling extensions, and if it is too hard to make it works properly, better find another solution!
Happy PHP-ing!
Rick Eisner
September 3, 2012
Hi all, but Help, please.
Was having no luck getting intl to work, throwing up my hands.Then I found this thread, and thought I had it.
I was working through EquaProduction’s excellent instructions. I adjusted it to download php-5.4.6 (the newest).
I got as far as ./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/ But this did not work at all. It responded:
configure: WARNING: you should use –build, –host, –target
configure: WARNING: invalid host type: –enable-intl
configure: error: invalid variable name: –with-icu-dir
Can anyone tell me what I am doing wrong?
szemian
September 3, 2012
Hi Rick,
It seems like you are using long hyphen instead of two minus before the variables. Try:
./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/
Sorry but I am far from my mac right now so I can’t verify.
Rick Eisner
September 4, 2012
Yes, you are absolutely right. Using — worked perfectly. Thanks!!!
szemian
September 4, 2012
You are welcome, happy php-ing!
Rick Eisner
September 5, 2012
Woops! It actually did not work as I’d hoped. All this installation has still left me with intl not installed in Library. I don’t understand…
I just found that ‘intl’ IS installed in /MAMP/Library/share/gettext/ Is that where it should be??
But there is still no ‘intl.so’ in modules. So this fails:
cp modules/intl.so /Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/imap.so
‘intl.so’ is in /usr/local/zend/lib/php_extensions/intl.so
Having a confusing time. Wish you were here!
szemian
September 5, 2012
Hi Rick,
If you followed the steps of EquaProduction, I think you should have your intl.so in php-5.4.6/ext/intl/modules/intl.so, but I am not 100% sure, as I would have to know your full system settings and the exact commands that you executed. Leave me a comment if you still have the terminal open, with all the commands you have executed.
Rick Eisner
September 6, 2012
Take a look.
>> Here is EquaProduction’s code.
This is the code I input.
>> # Download and extract ICU source code archive in Downloads folder. ( http://site.icu-project.org/download ) >> # I took 4.8.1 for Unix and other platforms ( http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz )
Downloaded icu4c-49_1_2-src.tgz and extracted icu4c-49_1_2-src .
>> cd icu/source
cd /Users/rickeisner/Downloads/icu4c-49_1_2-src/icu/source >> ./configure –prefix=/Applications/MAMP/Library
./configure -prefix=/Applications/MAMP/Library >> make
make >> sudo make install
sudo make install
>> # Download and extract the latest ( 5.3.10 ) php source code archive in Downloads folder
Downloaded php-5.4.6.tar.bz2 and extracted php-5.4.6 >> cd php-5.3.10/ext/intl
cd /Users/rickeisner/Downloads/php-5.4.6/ext/intl >> /usr/bin/phpize
/usr/bin/phpize >> ./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/
./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/ >> make
make
>> # Copy intl.so into php extensions folder >> cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626
At this point, I could not go on: could not find the intl. so in modules. I found it in /usr/local/zend/lib/php_extensions/intl.so ,
But I’m not sure that is the correct file…
>> # Modify php.ini >> echo “extension=intl.so” >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
BTW, I have done this, including extension=intl.so in /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
But I am unsure that this is the correct location. Should there be a new php5.4.6 location??
If you need more info on my ‘full system settings’, please tell me specifically what to get you.
Hope you can make some sense of all this!
Thanks!!!!
Rick Eisner
September 6, 2012
Many apologies for my last message, which arrived without correct linebreaks. Please look at this one instead. (I don’t know how to remedy the previous Msg.)
—–
Take a look.
>> Here is EquaProduction’s code.
This is the code I input.
>> # Download and extract ICU source code archive in Downloads folder. ( http://site.icu-project.org/download )
>> # I took 4.8.1 for Unix and other platforms ( http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz )
Downloaded icu4c-49_1_2-src.tgz and extracted icu4c-49_1_2-src .
>> cd icu/source
cd /Users/rickeisner/Downloads/icu4c-49_1_2-src/icu/source
>> ./configure –prefix=/Applications/MAMP/Library
./configure -prefix=/Applications/MAMP/Library
>> make
make
>> sudo make install
sudo make install
>> # Download and extract the latest ( 5.3.10 ) php source code archive in Downloads folder
Downloaded php-5.4.6.tar.bz2 and extracted php-5.4.6
>> cd php-5.3.10/ext/intl
cd /Users/rickeisner/Downloads/php-5.4.6/ext/intl
>> /usr/bin/phpize
/usr/bin/phpize
>> ./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/
./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/
>> make
make
>> # Copy intl.so into php extensions folder
>> cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626
At this point, I could not go on: could not find the intl. so in modules. I found it in /usr/local/zend/lib/php_extensions/intl.so ,
But I’m not sure that is the correct file…
>> # Modify php.ini
>> echo “extension=intl.so” >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
BTW, I have done this, including extension=intl.so in /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
But I am unsure that this is the correct location. Should there be a new php5.4.6 location??
If you need more info on my ‘full system settings’, please tell me specifically what to get you.
Hope you can make some sense of all this!
Thanks!!!!
szemian
September 7, 2012
Hi Rick,
looking at the list of commands that you have executed, you should have intl.so in /Users/rickeisner/Downloads/php-5.4.6/ext/intl /modules/intl.so. If it is not there, most probably you have an error in the “make” command. If the make is successful, the process should end with messages:
Build complete.
Don’t forget to run ‘make test’.
Btw, I think it is best to use the same php version of your MAMP, is MAMP supporting 5.4.6 already?
Rick Eisner
September 7, 2012
No, ma’am. My version of MAMP Pro supports php5.4.4. Does that make a difference?
szemian
September 7, 2012
Using the same version will ensure that the compile extension will not have any dependency issue, but there shouldn’t be much differences between 5.4.4 and 5.4.6.
Have you discovered why the missing intl.so?
Rick Eisner
September 11, 2012
Sorry, I’ve been away for a few days dealing with doctors.
I have not found the correct files. I have downloaded intl.so and moved it to (what I think is) the correct folder, but I cannot get MAMP PRO to recognize it. Part of this may be problems changing the “PHP 5.4.4 php.ini” file in MAMP PRO. But I’m not certain what is going wrong.
Maybe this simply will not work…
szemian
September 12, 2012
Hi Rick, where did you download the intl.so from?
Since you have issues compiling intl from scratch, have you tried to use macport?
p/s: Not sure why you have to deal with doctors but hope that you are well.
Rick Eisner
September 12, 2012
I downloaded from site.icu-project.org the file “icu4c-49_1_2-src.tgz 18.1 MB gzipped tar archive for Unix and other platforms”.
I have not tried using macport, though I have it on my Mac. This was also suggested by Appsolute (http://blog.geertvd.be/2011/05/18/installing-the-intl-extension-on-mamp/).
The problem is, I also have homebrew, which is recommended by another source (http://php-osx.liip.ch/). And installing homebrew cannot be done without disabling or removing macport and/or fink (it turns out).
It’s too much! I can’t figure out all these problems. There were also the intermediate level problems (use MAMP, or XAMPP, or any number of variants).
I’m almost ready to go back to square one: see http://www.larryullman.com/2012/02/24/mamp-without-mamp/ and also http://www.coolestguyplanettech.com/how-to-install-php-mysql-apache-on-os-x-10-6/ .
BTW, I’d also like to install Mountain Lion OS 10.8, so maybe I should do that first. Then I can install everything piecemeal (http://www.coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion).
But how does all this relate to intl and Symfony (my reason for all this)? Would they install if everything were updated???
My head hurts!
szemian
October 8, 2012
Hi Rick, I thought I replied your comment from my phone, but I just realized today that the comment has never been published and is lost!
Any luck in solving your issue?
Steph
October 8, 2012
Awesome! works like a charm on MAMP/php5.4.4 under Lion. Thanks @szemian.
szemian
October 8, 2012
You are welcome Steph, glad it helps!
HOPE
December 22, 2012
Anyone like to upload the ready compiled version for MountainLion somewhere *Please*?