Installing on OS X 10.8 with XAMPP

A piece of advice of anyone trying to install phalcon and phalcon-devtools on an OS X Mountain Lion machine - JUST DON'T BOTHER... USE A LINUX VM.

I've just spent hours fighting issue after issue here's a summary: 1) no compile tools as standard on OS X can install XCode or command line tools from Apple 2) cli tools from apple are now missing autoconf and libtools (at least) 3) install missing files from source 4) compile phalcon - hurrah 5) install XAMPP (MAMP has similar but different issues) 6) discover XAMPP uses 32bit components - boooo 7) rebuild phalcon in safe or 32bit mode stil doesn't work 8) create aliases to use XAMPP php binaries instead of OS X native 9) rebuild phalcon in safe or 32bit mode stil doesn't work 10) follow instructions here to rebuild phalcon in 32bit mode here: http://forum.phalconphp.com/discussion/235/mac-os-x-10-7-5#C953 11) phalcon extension seems to install ok 12) clone devtools to create a test project to test extension 13) run phalcon create project "extension not installed" even though I am using the correct php.ini file 14) note version of PHP used by XAMPP is 5.3.1 15) cry 16) install VirtualBox 17) install Linux VM 18) complete full phalcon installation with working phalcon dev-tools in less than 40mins 19) drink beer 20) sleep

I'm genuinely positive about the potential of Phalcon but the Mac OS X installation process is a complete nightmare and renders it unusable please make it better :)

Granted I may have had more luck installing my own AMP stack from scratch but that is hard to do right in a repeatable way and if you want people to use this framework that you have obviously worked so hard on then please make it easy to install - or at least warn people that it's not an easy process.



83.0k

First of all, thanks for the guide and the tips :)

I think these all-in-one stacks such as MAMP/XAMPP don't provide all the tools you need to build extensions (not just only Phalcon) and makes the process look very hard/complex.

I'm using macports (http://www.macports.org/) since some years ago and it's really easy install any package or compile php extensions.

In 10.10 it is simply possible to compile phalcon (in my case 1.3.4) using binaries provided by XAMPP itself . All you should do is using correct binary paths to compile the extension(XAMPP php , php-config, phpize) , actually i had some problems with AMPPS but with XAMPP it was ok and i have phalcon (XAMPP with PHP 5.6) installed. If i need to use CLI version i just can't recall whether i need to provide php.ini to ./php or not but it worked when i tried to test my CLI apps . The problem is now when i installed dev tools and dev tools is using the mac PHP binary and not the one i use with XAMPP (BTW mac PHP version is 5.5). Is it possible to provide PHP path for dev tools or not ? so dev tools use the correct binary path . If yes which file should i modify . for now it's impossible for me to switch and use default mac tools coz i need tools provided by XAMPP. And also using virtuall system is out of question .

I did a bit diggin and found a solution which helped me a alot , i just put some lines in my bash profile and forced system to use XAMPP binary instead of MacOS PHP binary, so this can be a workaround