Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7680175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:03:13+00:00 2026-05-31T18:03:13+00:00

I would like to try out Capistrano to deploy a PHP application but can’t

  • 0

I would like to try out Capistrano to deploy a PHP application but can’t see an option for replacing tokens in config files for different environments.

I’m using the Slim microframework which just uses an array in index.php for config variables like database username etc. I would like to put tokens such as %dbuser% in there which would be replaced at deploy time based on whether I am deploying to staging or production.

Is this possible in Capistrano? Or would I use something like Phing to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:03:14+00:00Added an answer on May 31, 2026 at 6:03 pm

    In Phing, if your deployment is Phing based, you could use the ReplaceTokens filter.

    Example (not tested):

    <target name="-modify-config"
            hidden="true" description="Modifies the xyz.conf ">
      <copy file="${some.directory}/xyz.conf.dist"
            tofile="${some.directory}/xyz.conf"
            overwrite="true" >
        <filterchain>
          <replacetokens begintoken="%" endtoken="%">
            <token key="KEY_A" value="${value.a}" />
            <token key="KEY_B" value="${value.b}" /> 
          </replacetokens>
        </filterchain>
      </copy>
    </target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to try programming genie , but I can't find neither source
I'm a pretty big noob to Java, but I would like try out htmlunit.
I would like to try out different animation styles for a popup window using
I built a slideshow/decision-making game in Flash but would like to try to redo
I would like to try out the Google App Engine Python environment, which the
I would like to try something out and unify some boilerplate code in one
I would like to try out a code in Microsoft Visual C# Express Edition
I am usually using table to do layouting. But I would like to try
I would like to try out the new features in VS 11 Developer Preview
I would like to use some ajax in a project but I can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.