PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, March 17, 2022

[FIXED] MAMP's php interactive mode broken?

 March 17, 2022     mamp, php     No comments   

Issue

I'm using MAMP Version 2.0.5 (2.0.5) on Mac OS X Lion 10.7.3. When I try to use php's interactive mode by

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

it displays Interactive mode enabled and then hangs. No commands work.

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


Solution

It works fine.

Type 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 has no prompt

To use the default php version that is shipped with OS X, you can do this in a 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


Answered By - Tyilo
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing