Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 17, 2011 7:59 pm 
Offline
Senior Newbie

Joined: Tue Aug 02, 2011 6:12 pm
Posts: 11
EDIT: Original issue solved, new question

I have a variable in my index.php file that needs to be set to 'development' locally, but stay set to 'production' in the repo. Is there a way I can have this file not commit this change to the repo, but not remove it from the repo completely?


Top
   
 Post subject:
PostPosted: Fri Aug 19, 2011 1:46 am 
Offline
Senior Newbie

Joined: Tue Aug 02, 2011 6:12 pm
Posts: 11
Bump for new question.


Top
   
 Post subject:
PostPosted: Fri Aug 19, 2011 2:13 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Wrong way to solve the problem. Why don't you have separate config files, one for production and one for dev, for those settings that depend on the deployment environment?

Then you can use environ variables on the server(s) with php's getenv() to define which one to load.

edit: or you can simply define your single var depending on the getenv() instead of having separate config files.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group