use a specific php.ini for php cli

AlexW474 alex.w474 at gmail.com
Thu Jun 12 14:34:46 UTC 2008



On Jun 4, 3:31 pm, Bill Moran <wmo... at potentialtech.com> wrote:
> In response to Nicolas Letellier <nico... at nicoelro.net>:
>
> > Hello.
>
> > I would like to know if it is possible to have anotherphp.ini forphp
> > command line? I have aphp.ini with many restrictions (open_basedir,
> > disabled functions, etc...) used byapache(and mod_php).
>
> > I would like to user anotherphp.ini file forphpcommand line (I don't
> > want to have disabled functions or safe_mode for command linephp).
>
> > I use php5 in the port tree.
> >From 'manphp':
>
>        --php-ini path|file
>        -c path|file   Look forphp.ini file in the directory path or  use  the
>                       specified file

You can use this instruction:
http://www.witsuite.com/support/knowledge-base/manual-installation/install-php.php#configure-php-to-use-in-command-prompt

It clearly shows how to use different php.ini for Apache PHP and PHP
CLI.
You can even create a few bat files with different environment.

Regards,
Alex


More information about the freebsd-questions mailing list