pingpong
pingpong

Reputation: 1237

can't find php.ini in the etc folder?

I have root access to my dedicated server, and when I run phpinfo() it says my php.ini file is in the etc/ directory, using ssh i can't seem to find it there, i don't know where i can find it thanks :))

Upvotes: 3

Views: 14375

Answers (3)

Craig Wayne
Craig Wayne

Reputation: 5060

a quick command to see which php.ini file you're using via command line / terminal

php -i | grep /php.ini

or

php --ini | grep /php.ini

Upvotes: 1

cweiske
cweiske

Reputation: 31078

As described in the PEAR installation manual, you can discover the ini files that PHP uses by running

$ php --ini
Configuration File (php.ini) Path: /etc/php/cli-php5
Loaded Configuration File:         /etc/php/cli-php5/php.ini
Scan for additional .ini files in: /etc/php/cli-php5/ext-active
Additional .ini files parsed:      /etc/php/cli-php5/ext-active/php_gtk2.ini,
                                   /etc/php/cli-php5/ext-active/xdebug.ini

Upvotes: 4

Andy Baird
Andy Baird

Reputation: 6208

This may not be a question for SO, but here's a couple potential solutions, all depending on your distro of course:

locate php.ini

Should give you the directory that php.ini resides in (You may need to do updatedb first)

Otherwise, there's always find.

find / -name "php.ini"

Upvotes: 6

Related Questions