Women in Technology

Hear us Roar

  PHP 4.3 and Mac OS X
Subject:   where is php.ini
Date:   2003-02-28 18:40:14
From:   tychay
Response to: where is php.ini

The default compile of php no longer installs a php.ini file.

There are two included with the php distribution php.ini.dist and php.ini.recommended(?).

The place to put the config file is in /etc/php.ini (if using Apple's directives) or /usr/local/etc/php.ini (if using the default configure, or Mark's compile). The quick way to find out (assuming php4.3+) is

bash-2.05a$ php -r "phpinfo();" | grep Configuration
Configuration File (php.ini) Path => /etc

If you can't do that (because you are using pre 4.3, for shame!) then try the <?php phpinfo() ?> script another post mentioned.

Hope this helps,

terry chay
tychay at php dot net

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • where is php.ini
    2005-06-10 07:46:19  zicco [View]

    if php -r does not work for your vertion of php, you can do (Linux only):

    echo "<?php phpinfo(); ?>"|php |grep Configuration