0

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.

Ken
  • 181
  • 1
  • 4

3 Answers3

1

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

Dirk Einecke
  • 111
  • 1
1

.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.

amateur barista
  • 478
  • 3
  • 7
  • 21
0

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

Chuck Burgess
  • 133
  • 1
  • 5
  • UPDATE: I also found success with XAMPP. It works really well and without the same limitations as MAMP: http://www.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 09:35