English 中文(简体)
How do you upgrade MAMP s PHP to PHP 5.3 ?
原标题:

I haven t been able to find any resources on how to do this.. Anyone have any ideas or resources?!

I ve tried changing the ./configure options and I m solving things one at a time but it seems like this method could take forever.. My current error is..

checking for jpeg_read_header in -ljpeg... no configure: error: Problem with libjpeg.(a|so). Please check config.log for more information.

I m running Snow Leopard.

Any help would be great, Matt Mueller

最佳回答

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

问题回答

I know this is an old question- but still relevant.

I m updating my MAMP and am keeping up to date on PHP s stable releases by using a guide I found at davidgolding.net

The Guide goes as follows:

First, run the

phpinfo()

function in a PHP script on your localhost or go to PHPMyAdmin and hunt down the configuration page. You should see a large chunk of configuration markup at or near the top:

 ./configure   --with-mysql=/Applications/MAMP/Library  
 --with-apxs2=/Applications/MAMP/Library/bin/apxs  
 --with-gd   --with-jpeg-dir=/Applications/MAMP/Library 
 --with-png-dir=/Applications/MAMP/Library   --with-zlib  
 --with-freetype-dir=/Applications/MAMP/Library  
 --prefix=/Applications/MAMP/bin/php5   --exec-prefix=/Applications/MAMP/bin/php5  
 --sysconfdir=/Applications/MAMP/conf/php5   --with-soap  
 --with-config-file-path=/Applications/MAMP/conf/php5 
 --enable-track-vars   --enable-bcmath   --enable-ftp   --enable-gd-native-ttf  
 --with-bz2=/usr   --with-ldap   --with-mysqli=/Applications/MAMP/Library/bin/mysql_config  
 --with-sqlite   --with-ttf   --with-t1lib=/Applications/MAMP/Library  
 --enable-mbstring=all   --with-curl=/Applications/MAMP/Library   --enable-dbx  
 --enable-sockets   --enable-bcmath   --with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i  
 --enable-soap   --with-kerberos   --enable-calendar  
 --with-pgsql=shared,/Applications/MAMP/Library/pg   --enable-dbase  
 --enable-exif   --with-libxml-dir=/Applications/MAMP/Library  
 --with-gettext=shared,/Applications/MAMP/Library   --with-xsl=/Applications/MAMP/Library  
 --with-pdo-mysql=shared,/Applications/MAMP/Library   --with-pdo-pgsql=shared,/Applications/MAMP/Library/pg  
 --with-mcrypt=shared,/Applications/MAMP/Library   --with-openssl 

Copy and paste this whole chunk into your text editor and remove the single quotes (search and replace should do it). Look for the flag

--with-pdo-mysql=shared,/Applications/MAMP/Library

and replace it with:

--with-pdo-mysql=/Applications/MAMP/Library

If you don’t do this, you might end up with an error.

ld: symbol(s) not found

Finally, add the following flag to the end:

--without-iconv

After you have downloaded the latest PHP release of your choosing from PHP Sources Snapshots,

cd

to the downloaded directory in Terminal. Paste your reformatted configuration string (all of it, including the beginning ./configure command) and run it.

After the configuration phase is finished, run:

$ make
$ sudo make install

Relaunch MAMP, and you’re good to go.

This is bound to cause a lot of headaches. The simplest solution is to navigate over to the mamp website and grab the latest version of the application. Download it, hit the install button and you will find your php version has been updated to the latest version...

Hope this helps, I spent quite a bit of time fiddling about with upgrading PHP before I actually looked :S

I don t know if MAMP has changed its configuration in the last few years but none of the solutions here helped me. What I did, and what worked right away was:

  1. Download the PHP version you want from MAMP
  2. Unzip it and move the new PHP folder into the MAMP/bin/php folder where you will see other subfolders with names like php5.3.7
  3. Restart MAMP
  4. Go to the PHP panel under Server in MAMP and choose the new verion of PHP from the drop menu
  5. Start MAMP.

reinstall whole MAMP is very safe. You dont even need to take a copy of old MAMP. the new install does it on its own. just feel free to download new MAMP and click install. only care u need to take is this

Edit httpd.conf and open up line to include vhosts.conf and copy old vhosts.conf from old MAMP folder.

Goto MAMP Download page then choose an update from the Heading "Additional PHP versions for MAMP PRO 2.2"





相关问题
PHP 延伸:将一物体与 __至String

在C撰写PHP延伸版时,我想将用户用地物体(IS_OBJECT)改为“......toString”(如果它有的话),否则就会失败。 我应当使用什么?

Transfer a variable to earier point without goto

How to write this without goto: ob_start(); $a = 0; echo "START of LEFT<br />"; begin: if($a > 0) { echo "CONTENT LEFT: $a<BR />"; <VERY DIFFICULT ALGORHITM> ...

variable predefinition, moving variable to earlier point

Ok, here s the deal where I m really stuck. I use my cms with design patterns. Where s the last final output(in design template s main file: design.php ): <div>{CONTENT_HEADER}</div> &...

How do you upgrade MAMP s PHP to PHP 5.3 ?

I haven t been able to find any resources on how to do this.. Anyone have any ideas or resources?! I ve tried changing the ./configure options and I m solving things one at a time but it seems like ...

How can I send all php errors run on one page to an email?

Basically I have a single page on my site that I want any php erorrs, warnings, etc to be sent to me in an email every time the script is run. Edit: this must be code that is placed on the page, not ...

热门标签