apache, mod_php & filename-dist

Michael A. Alderete lists-2003 at alderete.com
Mon Sep 22 10:12:27 PDT 2003


At 7:19 PM +0200 9/21/03, H. Bartel wrote:
>I installed mod_php4 on Apache and phpinfo(); tells me php 4.1.3 is
>running. Nevertheless variables do not get parsed at all. I tried looking
>for the /usr/local/etc/php.ini file and I realised it is called
>/usr/local/etc/php.ini-dist Could this be the reason or did I miss
>something?
>
>Is this like it is supposed to or is this some installation left-over
>distfile? I do have noticed quite a few of those filename-dist things on
>my system, like in /usr/local/www/data which is the apache root folder.


You didn't say if you installed PHP from the ports collection, or from
downloaded source. I use the source, so you may need to adjust my advice if
that's not your situation.

PHP initializes itself from a text file by default named php.ini. When you
view the phpinfo() page, it will tell you in what directory PHP is
expecting to find that file (it's adjustable at compile-time, and the
default changes, depending on whether you're using the ports or the source).

The -dist file is an example of a "good" php.ini file, which you will
normally copy, and then modify to suit your purposes. E.g.:

  cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
  vi /usr/local/etc/php.ini

In general, -dist files are intended to give you an example of a "good"
configuration, and should be preserved unmodified, so you can compare your
configuration to something known to be good, in the event you need to
troubleshoot, reset to a more basic configuration, etc.

HTH.

Michael
-- 

_____________________________________________________________
Michael A. Alderete           <mailto:lists-2003 at alderete.com>
                                     <http://www.alderete.com>


More information about the freebsd-questions mailing list