Best Cosmetic Hospitals Near You

Compare top cosmetic hospitals, aesthetic clinics & beauty treatments by city.

Trusted • Verified • Best-in-Class Care

Explore Best Hospitals

Set XAMPP PHP as default using vi

Uncategorized

✅ Set XAMPP PHP as default using vi

1️⃣ Open your shell config with vi

For bash (most common):

vi ~/.bashrc

For zsh:

vi ~/.zshrc

2️⃣ Edit the file in vi

  • Press i → enter INSERT mode
  • Go to the bottom of the file
  • Add this line:
export PATH=/opt/lampp/bin:$PATH

3️⃣ Save and exit vi

  • Press Esc
  • Type:
:wq
  • Press Enter

4️⃣ Reload the config

source ~/.bashrc
# or
source ~/.zshrc

5️⃣ Verify ✅

which php
php -v

Expected output:

/opt/lampp/bin/php

🔁 Temporary (current terminal only)

export PATH=/opt/lampp/bin:$PATH

🔍 Debug if it still shows /usr/bin/php

type -a php
echo $PATH

Best Cardiac Hospitals Near You

Discover top heart hospitals, cardiology centers & cardiac care services by city.

Advanced Heart Care • Trusted Hospitals • Expert Teams

View Best Hospitals
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x