-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple mapbooks support #59
Comments
|
Okay, so this solution still requires some documentation but now the local_settings file can be overridden with the environment variable, which can be set with Apache. |
|
How would this be done? |
|
Yes sir.
|
…che environment variable, refs: geomoose/geomoose#59
|
Great! |
|
Finally I got it working but I believe there are few things to sort. new_settings.ini refers to alt_mapbook.xml
My 0.02€ |
|
@cassiel74 - Thanks for the feedback! Re: 1. I'll double check the docs on this before release. PHP changes its recommendations a lot and so old docs/new docs/best practice can be different. My rage against PHP continues. Re: 2. I will add a note to the documentation about that. It would actually be better for people to specify root in the settings.ini file instead as that does not get published to the web, while the mapbook.xml contents is available in the browser. |
|
IMO the apache approach is way too restrictive when you want to deal with different "roles" (eg. I'm using drupal7 with three user roles). If you want to serve mapbooks according to user roles (privileges) it's rather easy to set a session variable using $_SESSION or $_ENV (or apache_setenv) on the php side after a check on users privileges (eg. using drupal_bootstrap api in a php script before geomoose is served). Doing this on the apache side requires that you define a virtual host for every role (SetEnv is invalid in I know this is not 100% on topic, but worth noting. |
|
One of the initial intents of having a getmapbook.php (vs pointing to a The HTML and JS part of GeoMoose is already agnostic about where the On 07/15/2015 04:11 AM, cassiel74 wrote:
|
|
Hunh, I could've sworn I've used SetEnv on Locations before but reviewing the Apache docs show I may have just been doing it on a Directory. That said, @klassenjs is right that the PHP scripts are really meant to be starting points and that people with more heavily customized environment can either pick-and-choose code from them or ignore them all together. FWIW, I've done GeoMOOSE installs based on Django and @klassenjs has a Perl/Ruby heavy environment that he manages. RFC-5 and some subsequent funding has me tasked with making the query side of scripts more modular on the PHP side of things. With the running theory that people could include GeoMOOSE PHP code in their own code base more like a library and less like a stand-alone application. On potential solution would be to write a custom "getMapbook()" in config.php (or some your preferred method of sane code management) that reads the Drupal environment. This would make getmapbook.php return the right values and fit right in with all of the other PHP scripts as they use that function to determine which mapbook to use. BEWARE YE, thare be dragons in those waters, as it makes upgrading a bit more difficult. I'm going to keep this ticket closed but when we meet about 2.8.1/2.9 plans I'll keep all of this in mind. |
|
I understood your point, BTW Geomoose 2.8.0 still uses $_ENV in config.php which won't work (at least here, Debian box PHP 5.6.11, Apache 2.4.12) |
|
@cassiel74 this is a separate question, but I'm curious if you have any trouble running GeoMoose with PHP 5.6.x? Did you compile PHP Mapscript for PHP 5.6.x? |
|
@tchaddad no problem, I use debian packages for both PHP and Mapscript, here follows exact debian release version |
Please add multiple mapbooks support - and related services - out of the box.
Regards
The text was updated successfully, but these errors were encountered: