[
https://issues.apache.org/jira/browse/SHINDIG-927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Chabot resolved SHINDIG-927.
----------------------------------
Resolution: Fixed
Hey Brent,
While the patch would work, I think it would be easier (and without the risk of
performance impact) to solve this differently:
The local.php is mean't to to live outside of svn, however if you do have it
included in your own local svn repo, you could easily do something like:
<?php
$shindigConfig = array(
.. long list of shared settings..
);
if (strpos('CentOS', $_SERVER["SERVER_SOFTWARE"]) !== false) {
// this is the production system running CentOS
$shindigConfig['compress_javascript'] = true;
$shindigConfig['debug'] = false;
} else {
// this is a developer's macbook
$shindigConfig['compress_javascript'] = false;
$shindigConfig['debug'] = true;
}
That would do everything you want it to do, and avoid having to depend on
include_path's (which aren't always modifiable, and slow to set) to get
multiple configs.
Hope that helps!
> Check for existence of config/local.php in include path
> -------------------------------------------------------
>
> Key: SHINDIG-927
> URL: https://issues.apache.org/jira/browse/SHINDIG-927
> Project: Shindig
> Issue Type: Improvement
> Components: PHP
> Affects Versions: trunk
> Environment: CentOS
> Reporter: Brent Theisen
> Priority: Trivial
> Fix For: trunk
>
> Attachments: fix-927-bug.patch
>
> Original Estimate: 0.02h
> Remaining Estimate: 0.02h
>
> I'm using an svn external to deploy shindig on production Linux servers as
> well as our development team's MacBooks. So, I need a config/local.php for
> both production and our local development environment. That way, I can have
> compress_javascript off and debug on when I'm developing locally but still
> have the correct setup in production.
> The directory structure and config files are like so:
> htdocs/shindig/ (svn:externals property set to shindig trunk)
> htdocs/shindig_configs/local/config/local.php
> htdocs/shindig_configs/prod/config/local.php
> Then for the Apache httpd.conf for prod I set the include path to something
> like "htdocs/shindig_configs/prod:.:/htdocs/shindig". For the local
> development httpd.conf I have the same include path directive except the
> first path is htdocs/shindig_configs/local.
> But this doesn't work until changing the file_exists() call in Config.php to
> a fopen() that looks for the file in the include path. I'm including the
> patch I'm using in the hopes you guys might commit it. Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.