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

Friday, February 18, 2022

[FIXED] Use MAMP Pro php.ini instead of OSX php

 February 18, 2022     apc, macos, mamp, php     No comments   

Issue

I'm having a problem running a command in php using APC in my mac. In the MAMP Pro i have it on but looks like my mac is not using MAMP's php but using osx'.

Any idea about how to tell my mac to use MAMP Pro instead of OSX' php.ini?


Solution

The MAMP Pro PHP executable should be located in /Applications/MAMP/bin/php/php5.x.x/bin/.

The OSX PHP is located in /usr/bin/php and /usr/bin is in PATH variable by default.

One way to make OSX use MAMP PHP is to add /Applications/MAMP/bin/php/php5.x.x/bin/ to your PATH variable (before /usr/bin):

Simply edit ~/.profile (ie. open Terminal.app, type vim ~/.profile) and add the following line to end of the file:

export PATH=/Applications/MAMP/bin/php/php5.x.x/bin/:$PATH

Note that you should replace xs in php5.x.x with the MAMP Pro PHP version.



Answered By - fardjad
  • 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