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?

link|improve this question

feedback

3 Answers

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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