0

When I run Apache via XAMPP Web Server I see that PHP version is: 5.6.30 using command: phpinfo();

But when I do php -v in console I get another version.

How to change global PATH php from XAMPP?

XAMPP uses: .:/Applications/XAMPP/xamppfiles/lib/php

Gama
  • 1
  • [I think this might help. Just change the httpd-xampp.conf file to refer to the version of php that you want to use. ](http://stackoverflow.com/a/23029961/4750964) – Dilip Kumar May 17 '17 at 12:27
  • It is not full information, I just need to change PATH – Gama May 17 '17 at 12:32

1 Answers1

0

I hope this will work for you

step1: sudo nano ~/.bash_profile

Add the below content.

step2:

   export XAMPP_HOME=/Applications/XAMPP

   export PATH=${XAMPP_HOME}/bin:${PATH}

   export PATH

Finally load your changes

step3: source ~/.bash_profile

Dilip Kumar
  • 33
  • 1
  • 5