Skip to content

Instantly share code, notes, and snippets.

@mfdj
Created January 19, 2015 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfdj/684acac3fd5e58c62ee3 to your computer and use it in GitHub Desktop.
Save mfdj/684acac3fd5e58c62ee3 to your computer and use it in GitHub Desktop.
grab the php.ini path in *nix shell (tested on osx bash)
# print it
$ echo `php -i | grep 'Load.*Config.*File.*=>' | sed s/'.* => '/''/`
# open it
$ $EDITOR `php -i | grep 'Load.*Config.*File.*=>' | sed s/'.* => '/''/`
# open it in sublimetext
$ subl `php -i | grep 'Load.*Config.*File.*=>' | sed s/'.* => '/''/`
## Keep in mind this is the php.ini used by the php executable found in your shell path.
## Depending on your installation/configuration your apache/ngnix php may load a different file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment