Hello,<div><br></div><div>yep thanks, missing two actually once put in place it all works well.</div><div><br></div><div>No doubt I will run into more problems as I go.</div><div><br></div><div>Thanks to all</div><div><br>
</div><div>Carl<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 2:16 PM, Brent Fraser <span dir="ltr">&lt;<a href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
    
  
  <div text="#000000" bgcolor="#ffffff">
    Are you missing a dot?<br>
    <br>
    $_COOKIE[&#39;UU_USERID&#39;].&#39;_&#39;<br>
    <pre cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 2/9/2011 5:07 AM, Carl Burn wrote:
    <blockquote type="cite">Hello again,
      <div><br>
      </div>
      <div>took a stab at this and I have set up two cookies for the
        purpose of passing across my values for the mapbook I want to
        use and building the file name to be used from two elements
        which are separated with an underscore. </div>
      <div><br>
      </div>
      <div>I have replaced the getmapbook function with the new code as
        follows:</div>
      <div><br>
      </div>
      <div>
        <div>function getMapbook() {</div>
        <div>        global $CONFIGURATION;</div>
        <div>        $mapbook = new DOMDocument();</div>
        <div>  </div>
        <div>       if($_COOKIE[&#39;UU_MAPBOOK&#39;]) {</div>
        <div>      
 $mapbook-&gt;load(&#39;../../conf/&#39;.$_COOKIE[&#39;UU_USERID&#39;]&#39;_&#39;.$_COOKIE[&#39;UU_MAPBOOK&#39;]&#39;.xml&#39;);</div>
        <div>        #
          $mapbook-&gt;load(&#39;../../conf/&#39;.$CONFIGURATION[&#39;mapbook&#39;]);</div>
        <div><br>
        </div>
        <div>       } else { </div>
        <div>        # load the default...</div>
        <div>      
           $mapbook-&gt;load(&#39;../../conf/&#39;.$CONFIGURATION[&#39;mapbook&#39;]);</div>
        <div>       }</div>
        <div>        return $mapbook;</div>
        <div>  }</div>
        <div><br>
        </div>
        <div>This results in an empty application (not showing any
          layers or toolbar), first thing I did was to check the cookies</div>
        <div>I guess I have something wrong in the way that I build up
          the file name as the mapbook is not called, I know that the
          code is seeing the cookie and have tested this by simply
          putting in a test file name instead of the values from the
          cookies and then the mapbook is read and the application
          works. </div>
        <div><br>
        </div>
        <div>So the error lies here I think:</div>
        <div><br>
        </div>
        <div>$mapbook-&gt;load(&#39;../../conf/&#39;.$_COOKIE[&#39;UU_USERID&#39;]&#39;_&#39;.$_COOKIE[&#39;UU_MAPBOOK&#39;]&#39;.xml&#39;);</div>
        <div><br>
        </div>
        <div>anybody see my error?</div>
        <div><br>
        </div>
        <div>Many thanks</div>
        <div><br>
        </div>
        <div>Carl</div>
        <br>
        <div class="gmail_quote">On Tue, Feb 8, 2011 at 4:08 PM, Dan
          Little <span dir="ltr">&lt;<a href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            <div>
              <div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
                <div>You are correct, check out my previous post.</div>
                <blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
                  <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br>
                    <div style="font-family:times new roman,new york,times,serif;font-size:12pt">
                      <font face="Tahoma" size="2"><b><span style="font-weight:bold">From:</span></b>
                        Carl Burn &lt;<a href="mailto:burnsy@northcountrywoods.co.uk" target="_blank">burnsy@northcountrywoods.co.uk</a>&gt;<br>
                        <b><span style="font-weight:bold">To:</span></b>
                        <a href="mailto:geomoose-users@lists.sourceforge.net" target="_blank">geomoose-users@lists.sourceforge.net</a><br>
                        <b><span style="font-weight:bold">Sent:</span></b>
                        Tue, February 8, 2011 10:05:19 AM<br>
                        <b><span style="font-weight:bold">Subject:</span></b>
                        Re: [Geomoose-users] URL parameters<br>
                      </font><br>
                      Hello again,
                      <div><br>
                      </div>
                      <div>I took a look at this and the code I think I
                        need to alter is pretty much this section of the
                        config.php file:</div>
                      <div><br>
                      </div>
                      <div>
                        <div># Load the configration file</div>
                        <div>$CONFIGURATION =
                          parse_ini_file(&#39;../../conf/settings.ini&#39;);</div>
                        <div><br>
                        </div>
                        <div>function getMapbook() {</div>
                        <div><span style="white-space:pre-wrap"> </span>global
                          $CONFIGURATION;</div>
                        <div><span style="white-space:pre-wrap"> </span>$mapbook
                          = new DOMDocument();</div>
                        <div><span style="white-space:pre-wrap"> </span>$mapbook-&gt;load(&#39;../../conf/&#39;.$CONFIGURATION[&#39;mapbook&#39;]);</div>
                        <div><span style="white-space:pre-wrap"> </span>return
                          $mapbook;</div>
                        <div>}</div>
                      </div>
                      <div><br>
                      </div>
                      <div>I am a CF person not a php person (so bear
                        with me) but this looks like it gets the mapbook
                        from the settings.ini, reads it and then puts
                        the content into a variable called mapbook. So
                        if I can modify this functionality to take the
                        details from the url parameter I am passing in
                        then that should be it, the security I can
                        handle in other ways.</div>
                      <div><br>
                      </div>
                      <div>Is this making sense?</div>
                      <div><br>
                      </div>
                      <div>Carl</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                        <div class="gmail_quote">On Tue, Feb 8, 2011 at
                          3:43 PM, Carl Burn <span dir="ltr">&lt;<a rel="nofollow" href="mailto:burnsy@northcountrywoods.co.uk" target="_blank">burnsy@northcountrywoods.co.uk</a>&gt;</span>
                          wrote:<br>
                          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Hello
                            all,
                            <div><br>
                            </div>
                            <div>one thought occurs, how do I go about
                              changing the name of the index file that
                              is called when geomoose starts up, at the
                              moment this is geomoose.html.</div>
                            <div>Is this simply a case of changing the
                              file name or is it wired into the setup of
                              geomoose, if I can alter the file
                              extension then I can see a way to solve
                              this easily.</div>
                            <div><br>
                            </div>
                            <div>Carl<br>
                              <br>
                              <div class="gmail_quote">On Tue, Feb 8,
                                2011 at 3:39 PM, Carl Burn <span dir="ltr">&lt;<a rel="nofollow" href="mailto:burnsy@northcountrywoods.co.uk" target="_blank">burnsy@northcountrywoods.co.uk</a>&gt;</span>
                                wrote:<br>
                                <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Hi,
                                  <div><br>
                                  </div>
                                  <div>mid afternoon here, still a while
                                    to go before I head off...and I
                                    think that may be extended so I can
                                    resolve this one. </div>
                                  <div><br>
                                  </div>
                                  <div>I am passing in the parameter for
                                    map book every time a user accesses
                                    geomoose as they all have unique
                                    files...and just to be really fun
                                    they are likely to be unique on
                                    every visit, so I am generating a
                                    mapbook on the fly as the user
                                    attempts to access geomoose.</div>
                                  <div><br>
                                  </div>
                                  <div>Not to sure I understand what you
                                    mean by 1 or 2 but I think I may
                                    head over and get a copy of 1.x</div>
                                  <div><br>
                                  </div>
                                  <div>Cheers</div>
                                  <div><br>
                                  </div>
                                  <div>Carl<br>
                                    <br>
                                    <div class="gmail_quote">On Tue, Feb
                                      8, 2011 at 3:24 PM, Dan Little <span dir="ltr">&lt;<a rel="nofollow" href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>&gt;</span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                                        <div>
                                          <div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
                                            <div>Good morning (at least
                                              for me, you&#39;re probably
                                              trying to leave the office
                                              about now)!</div>
                                            <div><br>
                                            </div>
                                            <div>GM2.2 doesn&#39;t directly
                                              support passing in a
                                              mapbook parameter as did
                                              the 1.X series.  The
                                              reason for this is
                                              three-fold:</div>
                                            <div>1) It wasn&#39;t a terribly
                                              popular functionality.</div>
                                            <div>2) It was a gaping
                                              security hole.</div>
                                            <div>3) It requires all of
                                              the subsequent services to
                                              know they need to switch
                                              mapbooks.</div>
                                            <div><br>
                                            </div>
                                            <div>There are some options,
                                              and they all center around
                                              modifying the getMapbook
                                              function of config.php.
                                               Two popular solutions:</div>
                                            <div>1) Parser the &quot;referrer
                                              url&quot; from the HTTP header
                                              and get the mapbook
                                              parameter from that.</div>
                                            <div>2) Read a cookie for a
                                              login/authorization schema
                                              and select the appropriate
                                              mapbook.</div>
                                            <div><br>
                                            </div>
                                            <div><br>
                                            </div>
                                            <blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
                                              <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br>
                                                <div style="font-family:times new roman,new york,times,serif;font-size:12pt">
                                                  <font face="Tahoma" size="2"><b><span style="font-weight:bold">From:</span></b>
                                                    Carl Burn &lt;<a rel="nofollow" href="mailto:burnsy@northcountrywoods.co.uk" target="_blank">burnsy@northcountrywoods.co.uk</a>&gt;<br>
                                                    <b><span style="font-weight:bold">To:</span></b>
                                                    <a rel="nofollow" href="mailto:geomoose-users@lists.sourceforge.net" target="_blank">geomoose-users@lists.sourceforge.net</a><br>
                                                    <b><span style="font-weight:bold">Sent:</span></b>
                                                    Tue, February 8,
                                                    2011 9:18:01 AM<br>
                                                    <b><span style="font-weight:bold">Subject:</span></b>
                                                    [Geomoose-users] URL
                                                    parameters<br>
                                                  </font><br>
                                                  Hi All,
                                                  <div><br>
                                                  </div>
                                                  <div>I am passing
                                                    across a url
                                                    parameter of mapbook
                                                    to geomoose and it
                                                    looks like it is
                                                    simply being
                                                    ignored, for
                                                    example:</div>
                                                  <div><br>
                                                  </div>
                                                  <div><span><span><a href="http://www.aqua3.com:2112/geomoose2/geomoose.html?mapbook=62_1364345175.xml" target="_blank">http://www.aqua3.com:2112/geomoose2/geomoose.html?mapbook=62_1364345175.xml</a></span></span></div>

                                                  <div><br>
                                                  </div>
                                                  <div>The system simply
                                                    uses the default
                                                    mapbook as defined
                                                    in the config.ini
                                                    file and ignores the
                                                    url parameter
                                                    totally, I checked
                                                    the documentation
                                                    link for this and my
                                                    call looks correct.
                                                    The mapbook file is
                                                    valid and works if I
                                                    put it into the
                                                    config.ini. I also
                                                    tried not setting a
                                                    mapbook in the
                                                    config.ini..this
                                                    results in no map
                                                    even when the
                                                    mapbook is specified
                                                    on the url as a
                                                     parameter. </div>
                                                  <div>I know its going
                                                    to be an obvious one
                                                    but can someone
                                                    point out what I
                                                    have missed please.</div>
                                                  <div><br>
                                                  </div>
                                                  <div>Best</div>
                                                  <div><br>
                                                  </div>
                                                  <div>Carl</div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </div>
                                          <br>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </blockquote>
                              </div>
                              <br>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre><fieldset></fieldset>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
<a href="http://p.sf.net/sfu/intel-dev2devfeb" target="_blank">http://p.sf.net/sfu/intel-dev2devfeb</a></pre>
      <pre><fieldset></fieldset>
_______________________________________________
Geomoose-users mailing list
<a href="mailto:Geomoose-users@lists.sourceforge.net" target="_blank">Geomoose-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a>
</pre>
    </blockquote>
  </div>

</blockquote></div><br></div>