[Chameleon] proxy problems..

Sears, Jeremy Jeremy.Sears at CCRS.NRCan.gc.ca
Mon Mar 20 14:30:43 EST 2006


ok,
Again, Im not sure if this problem is specific to our set-up or not. Im
posting the solution to the list for the sake of the archive.

The problem seemed to be in the html/css code. 

In out phtml file, we include a coupla other files to draw headers and
footers on the map page. Here's a snipping of our phtml:
>>>>>
...
$szMapFile = "../map/cummhs_e.map";
$tabMenu="fireactivity";
$rectMenu1="cummhs";

include "./tools/includes/footer.php";  //problem
include "./tools/includes/header.php";  //problem
...
>>>>>

This worked fine when viewing the mappage from localhost, and from our LAN.
However, for security reasons and such inorder to see the mappage from the
web, one must go through a proxy (IIS proxy..). This created a problem, the
main map image and the keymap image would not load.

In testing the page from the web, we commented out all of the include files
in the phtml and found that the map images would then load. It was also
noted that older include files when used in the phtml didnt not interfere
with the drawing of the map images (we recently had the media folks here
give our webmap application a facelift). After comparing the differences
between the old include files and new ones (old headers/footers and new
headers/footers) the functional difference was the inclusion of html <body>
tags. 

so an included header file that didnt work looks like:

********************************************
<div id="footer">
<link href="./tools/css/tabmenu.css" rel="stylesheet" type="text/css">
<div id="footer_content">
<p align="center"><a href="index_f.php">Français</a><strong> | </strong><a
href="ind_partners_e.php">Partners</a><strong> | </strong><a
href="ind_login_e.php">Secured Access</a><strong> | </strong><a
href="ind_contact_e.php">Contact Us</a> | Legal Disclaimer | Photo credits |
Frequently asked questions</p></div>
<div id="footer_logos">
<img src="./tools/includes/logo_footer.gif" alt="" width="850" height="32"
border="0">

</div>
</div>
********************************************

 adding body tags to the code produced results 

included header that works:
*********************************************

<body>
<div id="footer">
<link href="./tools/css/tabmenu.css" rel="stylesheet" type="text/css">
<div id="footer_content">
<p align="center"><a href="index_f.php">Français</a><strong> | </strong><a
href="ind_partners_e.php">Partners</a><strong> | </strong><a
href="ind_login_e.php">Secured Access</a><strong> | </strong><a
href="ind_contact_e.php">Contact Us</a> | Legal Disclaimer | Photo credits |
Frequently asked questions</p></div>
<div id="footer_logos">
<img src="./tools/includes/logo_footer.gif" alt="" width="850" height="32"
border="0">

</div>
</div>
</body>
*********************************************

A simpler solution to this was to just echo <body> tags from the phtml, and
opener before the includes and a closer after the includes.



This was sort of a blind solution. Im not sure why this solved the problem.
If anyone has any thoughts please share them with me.

Thanks
Jeremy






-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org]On Behalf Of Sears, Jeremy
Sent: March 20, 2006 1:39 PM
To: 'Julien-Samuel Lacroix'
Cc: 'chameleon at lists.maptools.org'
Subject: RE: [Chameleon] proxy problems..


Hi,
I think Ive narrowed the problem down to our particular flavour of cascading
style sheets. For some reason, one set of styles we are using with the site
in question breaks mapserver, or at least does somthing to prevent it from
drawing on the page. When I subsitute in older style sheets we were using
with this same app some time ago, everything works fine. I dont know what
the problem is specifically, nor am I sure if it is particular to our set-up
or if it is more of a broader compatibility issue.... Im currently looking
into it. Thanks to everyone who has provided assistance.

Jeremy

-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org]On Behalf Of Julien-Samuel
Lacroix
Sent: March 20, 2006 12:03 PM
To: Sears, Jeremy
Cc: 'chameleon at lists.maptools.org'
Subject: Re: [Chameleon] proxy problems..


What did you comment out to make it work?

When viewed from the web, the drawmap URL works?

Julien

Sears, Jeremy wrote:
> Hi Julien,
> 
> ok, here are what I get for variables:
> 
>>From LAN, works:
> var gMapDHTMLURL =
>
'/myspace/chameleon//common//wrapper/drawmap.php?map_session_mode=1&run_quer
> y=0&sid=441ed6567f126&dummy=0.44188400+1142871639';
> 
>>From WAN, doesnt work:
> var gMapDHTMLURL =
>
'/myspace/chameleon//common//wrapper/drawmap.php?map_session_mode=1&run_quer
> y=0&sid=441ed7059161f&dummy=0.49006900+1142871814';
> 
> .... they look to be the same?
> 
> PhP error reporting is on E_ALL, no php errors are being reported ...
> 
> Also, we noticed that when we comment-out the includes in our phtml file,
> the mapimage and keymap will finally show up when viewed from the web... 
> 
> eg:
> 
> include "./tools/includes/cfs_ess_bar.php";  //problem
> 
> these are including code to draw things like nav bars, headers and footers
> on the same page as the map.\
> It would seem that they are causing the map to fail when viewed from the
> web. Again, there are no prbs when viewed from LAN.
> 
> The gMapDHTMLURL var that is given when the map (sans includes in phtml)
is
> successfully viewed from the web is:
> 
>
'/natdist/chameleon//common//wrapper/drawmap.php?map_session_mode=1&run_quer
> y=0&sid=441eda1b8ccef&dummy=0.45470900+1142872604';
> 
> Thanks
> Jeremy
> 
> 
> 
> 
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org]On Behalf Of Julien-Samuel
> Lacroix
> Sent: March 20, 2006 10:54 AM
> To: Sears, Jeremy
> Cc: 'chameleon at lists.maptools.org'
> Subject: Re: [Chameleon] proxy problems..
> 
> 
> Hi,
> If you do a "View Source" in your browser, you will get the URL to your 
> drawmap.php in a JS variable.
> var gMapDHTMLURL = 'http://.../drawmap.php...'
> 
> If you copy paste that in another window, you will get what is return by 
> the server. Try it when it works and when it don't. When it don't work, 
> you will probably get a mapfile error or a session error. We will try to 
> investigate from there. Don't forget to set you php.ini to show all
errors:
> error_reporting  =  E_ALL
> 
> Julien
> 
> Sears, Jeremy wrote:
> 
>>Hi all,
>>This email is related to a couple I posted last week seeking assistance
> 
> with
> 
>>my chameleon install behind a proxy... I think the nature of the issue (or
>>at least how I understand it) has changed so I am posting a simmilar
>>question ....
>>I have a mapserver/chameleon application installed on one of our networked
>>servers. When I look at my application from behind our LAN, everything
> 
> works
> 
>>fine. When I look at it from the web, the mapserver generated images dont
>>show up. A note on web access: Inorder to get to the server from WAN, http
>>requests go through a firewall/ proxy server. Obviously the server has a
>>different name when one looks at its pages from WAN than from LAN. 
>>
>>My entire ms4w/chameleon install is setup in a directory on the server
>>simmillar to: d:/proxy/myspace/ms4w/ ..etc ..
>>
>>My application files are set up in a dir simmilar to:
>>d:/proxy/myspace/webappfiles/
>>
>>I have made changes to the conf files so that this set-up works (for the
>>most part).
>>
>>Ok, my application doesnt work from the web. However, all of chameleon's
>>samples work perfectly from the web! My application is not overly
>>dissimmilar to the chameleon samples. This makes me think that the issue
> 
> is
> 
>>a small one, perhaps a line of code im my app, or an incorrectly
> 
> referenced
> 
>>file. Can anyone who is more fammilliar with chameleon suggest what might
> 
> be
> 
>>goin on here? Im assuming that since cham's sample apps work fine, the
>>problem is not with either of the http servers that a web client must pass
>>to get to the app, and likly in my chameleon setup.
>>Im going to go line by line through my files, any thoughts on where I
> 
> should
> 
>>be checking?
>>
>>Many Thanks
>>Jeremy
>> 
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
> 
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



More information about the Chameleon mailing list