Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.