nexoBlogs network
Anonymous Anonymous

Instalar PHP 5.3 en MAMP

Wednesday, 14 de April del 2010
filed under

Actualización: La nueva versión de MAMP ya trae PHP 5.3 por lo que ya no es necesario hacerlo a mano. Bájate la última versión!

Hola,

A día de escribir este post MAMP viene con la versión 5.2.11 de PHP por lo que no se pueden utilizar muchas de las funciones interesantes que tiene la nueva versión, yo concretamente quería utilizar funciones de fecha como DateTime::createFromFormat() y los namespaces. Para solucionarlo he hecho lo siguiente

A la conciencia vuestra irá si se os rompe la configuración (a mi me va):

Instrucciones para instalar PHP 5.3 en Mac con MAMP

1) Descargar la versión 5.3 de la página de Snapshots a día de hoy este es el fichero comprimido

2) Descomprimir y navegar por terminal hasta el lugar donde se ha descomprimido

3) En la terminal, dentro de la carpeta lanzar el configure con las opciones de vuestro Config:

./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=/Applications/MAMP/Library/pg --with-mcrypt=shared,/Applications/MAMP/Library --with-openssl --with-apxs2=/usr/sbin/apxs --with-png-dir=/usr/X11 --with-freetype-dir=/usr/X11

4) Si todo va bien (el punto anterior es la madre del cordero):

make
make install

Si encontráis errores podéis desactivar las librerías que os fallan (si no las necesitáis) y si no en el proyecto Fink podéis descargar un montón de ellas y lanzar los -with-librerira-tal=/sw etc...

Comentarios sobre Instalar PHP 5.3 en MAMP

Muy interesante.

Sólo recordar a quien lea este post que deben tener instalado XCode. Lo encontrará incluido en el dvd de macOS.

Gracias por el post. 

Leave your comment about Instalar PHP 5.3 en MAMP

Leave your comment
You need javascript to be activated on irder to leave comments

Login in OboLog, or create free blog if you don't have one yet.

Then we'll remember your data and show your avatar in your comments.

Sponsors

Login

Otros blogs de nexoBlogs: