# php security: php.ini

## D-LINC

I wanted to go over my php.ini file to see if settings are as secure as they could be. I run lighttpd. I want to make sure I'm editing the right file, but there seems to be a few of them:

```

# locate php.ini

/etc/config-archive/etc/php/cgi-php5.3/php.ini

/etc/config-archive/etc/php/cgi-php5.3/php.ini.dist.new

/etc/php/cgi-php5.3/php.ini

/etc/php/cli-php5.3/php.ini

/usr/share/doc/php-5.3.8/php.ini-development.bz2

/usr/share/doc/php-5.3.8/php.ini-production.bz2

```

Are the files in /etc/php the only ones I need to edit? And what is the difference between cgi-php and cli-php?

----------

## a3li

Yes, the files in /etc/php are the ones you need to edit.

cgi-php contains the settings for PHP when used as CGI interpreter, that is the case with your lighttpd setup. CLI refers to command line interface, the settings in the cli-php directory thus apply when you execute php in a shell.

----------

