MAMP php interactive mode broken?

I am using MAMP version 2.0.5 (2.0.5) on Mac OS X Lion 10.7.3. When I try to use php interactive mode

/Applications/MAMP/bin/php/php5.3.6/bin/php -a

displays Interactive mode enabledand then freezes. No commands work.

This message forum says others found it broken. Has anyone found a fix?

+5
source share
3 answers

It works great.

Enter this after you see Interactive mode enabled:

<?php
echo "test\n";
?>

and press ctrl + d.

test will be printed.

Also see this question: mac os php intratactive mode doesn't have a hint

To use the standard version phpthat ships with OS X, you can do this in the terminal:

mv /Applications/MAMP/bin/php/php5.3.6/bin/php /Applications/MAMP/bin/php/php5.3.6/bin/php.bak
ln -s /usr/bin/php /Applications/MAMP/bin/php/php5.3.6/bin/php
+2
source

, , PHP, readline (--with-readline). - , Debian - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576218

+4

You need to install the php5-readline extension

sudo apt-get install php5-readline
0
source

All Articles