2

When setting up php on a new Unix-based server, are there any default PHP settings that you will always change? Any that you will always consider changing based on the particular environment?

Yaakov Ellis
  • 556
  • 1
  • 10
  • 15

3 Answers3

7

A default installation of PHP on a UNIX server pretty much works out of the box. Much of the configuration depends on your desired usage of the server.

Here's what I do:

  • Change upload_max_filesize from the default value (2M) to something higher.
  • Install and enable the modules that I use most often:
    • php5-gd
    • php5-cli
    • php5-suhosin
    • php5-curl

But again: most of the configuration is dependent on what you use the server for, which makes it hard to provide a simple answer to this question.

Aron Rotteveel
  • 8,449
  • 17
  • 53
  • 64
0

Disabling magic quotes is one of the first things that I do. It does nothing but cause problems and introduce a false sense of security. I'm clueless to why its on by default.

Adam Gibbins
  • 7,317
  • 2
  • 29
  • 42
0

There isn't something that I always change. Actually, there's rarely anything I change, for any given installation.

If it's my own for-development-and-play-server, I probably max out the permissions to do anything, but when deploying a server for something specific, I want to have the PHP as strict as possible, without affecting the functionality of the scripts too much.

Henrik Paul
  • 173
  • 3
  • 7