Announcement

Collapse
No announcement yet.

managing PHP configuration files

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • managing PHP configuration files

    I'm working on a PHP project with multiple developers and we are using SVN for version control. In this project, the codebase has a configuration.php file which is currently checked into the webroot in our repository. The problem is that each developer needs a different local version of this file, we need one more version for the development server (dev.example.com) and still another for the production site (www.example.com).

    I have suggested we remove configuration.php from version control and instead check in configuration-dev.php and configuration-production.php so that we will have the necessary credentials under version control and then we each add an ignore rule for configure.php and create our own local configuration.php as needed.

    Has anyone dealt with this situation before? Can you recommend a good approach for dealing with this situation? This seems like it would be a common problem and I expect there might be some standard approach to it.

  • #2
    Originally posted by sneakyimp View Post
    I have suggested we remove configuration.php from version control and instead check in configuration-dev.php and configuration-production.php so that we will have the necessary credentials under version control and then we each add an ignore rule for configure.php and create our own local configuration.php as needed.

    Has anyone dealt with this situation before? Can you recommend a good approach for dealing with this situation? This seems like it would be a common problem and I expect there might be some standard approach to it.
    Your solution is the one recommended in the official Subversion FAQ. If that's not good enough, I don't know what is.

    Comment


    • #3
      Thanks for your response, andyl. That seems pretty definitive to me!

      Comment

      Working...
      X