-1

I need to make some changes to the php.ini file. Can anyone tell me how and where can i find php.ini file on linux based server using Command line?

Muhammad Azharuddin
  • 129
  • 1
  • 4
  • 12

2 Answers2

4

Just run the following command in the terminal to locate your php.ini file:

php -i | grep php.ini
Sangar82
  • 5,070
  • 1
  • 35
  • 52
0

just run on your command line

php --ini

You will get something like

Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      /etc/php5/cli/conf.d/curl.ini,
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_sqlite.ini,
/etc/php5/cli/conf.d/sqlite.ini,
/etc/php5/cli/conf.d/sqlite3.ini,
/etc/php5/cli/conf.d/xdebug.ini,
/etc/php5/cli/conf.d/xsl.ini

Duplicate of Dude, where's my php.ini?

Community
  • 1
  • 1
Nishant
  • 3,614
  • 1
  • 20
  • 26