Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been struggling with this for quit a while... Googling all sorts of things has brought up anything useful so far.

I have MAMP 1.8.4 install on my MBP running snow leopard - i want to upgrade to PHP to 5.3 to fit to my new job's working environment.. however i can't seem to get it to work.

I've tried downloading the 5.3 source and compiling it using's MAMP's ./configure statement but i always get an error regarding apxs and a possibly missing config_vars.mk file from that i understand.

Has anyone been able to do this successfully? If so how?

What were to happen if i were to drop the --with-apxs from the configure line? would it break the apache/php ?

Thanks in advance for any help.

share|improve this question

migrated from stackoverflow.com Mar 10 '10 at 7:36

This question came from our site for professional and enthusiast programmers.

3 Answers 3

The current version (1.9) of MAMP / MAMP PRO includes PHP 5.3 and is available on the MAMP download page.

share|improve this answer

.configure --with-apxs2 specifies that you want to install PHP as an Apache 2 shared module.

" Would (dropping --with-apxs2) break Apache/php? "

I would simply not do it because if you follow David Golding's instructions posted by @cdburgess, you'll see that MAMP has been configured to use PHP as an Apache 2 shared module. If you eliminate that directive I don't know what 's going to happen. But if MAMP came with it, it would make sense to leave it in for a more predictable upgrade path.

config_vars.mk

The folks behind MAMP decided not to include that file in the MAMP distribution in order to make your life more difficult, try finding that file in your Mac and you'll confirm their insidious ways.

insidious ways

Resolve the problem by installing another copy of the same version of Apache in a separate folder, then moving the compiled build folder into the MAMP/library/ folder. Once you do that you should be able to compile PHP and PECL extensions. Bonus perk: do that and you'll also be able to compile Apache with additional modules!

Maybe this article about compiling PHP with Apache from scratch will also help you.

share|improve this answer

I am in the same boat. I was able to get past it by changing:

--with-apxs2=/usr/sbin/apxs

There is also a great reference about this here:

http://www.davidgolding.net/cakephp/upgrading-php-in-mamp.html

share|improve this answer
    
UPDATE: I also found success with XAMPP. It works really well and without the same limitations as MAMP: apachefriends.org/en/xampp-macosx.html#849 –  Chuck Burgess Mar 11 '10 at 23:10
    
but then doesn't this break the MAMP installation if you're using a different apxs? which in turn uses a different config_vars.mk than the one used to compile the MAMP package? –  Ken Mar 12 '10 at 9:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.