Skip to content

Instantly share code, notes, and snippets.

@hanafiah
Last active March 6, 2023 06:55
Show Gist options
  • Save hanafiah/11237390 to your computer and use it in GitHub Desktop.
Save hanafiah/11237390 to your computer and use it in GitHub Desktop.
ubah default php path dalam mac osx
#1. buka terminal, dan taip arahan di bawah
which php
#2. secara default, lokasi php adalah seperti berikut
/usr/bin/php
#3. edit bash_profile
sudo vim ~/.bash_profile
#3a. if use zsh
sudo vim ~/.zprofile
#4. masukkan line dibawah
export PATH="/Applications/XAMPP/xamppfiles/bin:$PATH"
#5. restart terminal dan taip arahan dibawah
which php
#6. jika langkah di atas sukses, path yang dipaparkan adalah seperti langkah 4 di atas
/Applications/XAMPP/xamppfiles/bin/php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment