[Chameleon] Moving an application dir ...

Sears, Jeremy Jeremy.Sears at CCRS.NRCan.gc.ca
Wed Mar 1 11:16:16 EST 2006


Hi Julien,

After following your suggestions, Ive managed to get the application working
about 90% on the new disk. I can now get the scalebar, n.arrow and legend
images to draw. The only problem that remains is that the images associated
with the widgets display as broken links. When I check the properties of
these broken images, it would appear that the url's are correct, also the
images that the urls point to exist in the directory where they should.
However they dont make it to the browser window. If you have any more
thoughts Id like to hear them.


	The reason for my attempt to relocate the map app to another disk is
because we would like to seperate the application and its data from the web
and map server. The rational is that this will increase security when the
site goes live. Can you (or anyone on the list) advise on the following.
Will this move of the application to a seperate disk improve the security?
Can you think of a better way to increase the security of ms4w/chameleon
install? I have searched on the keyword 'security' on the MS site but cannot
find specific recommendations of securing such an application. Have I missed
essential documentation?

Once again, Thanks for all of you help!
Jeremy






-----Original Message-----
From: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com]
Sent: February 28, 2006 5:17 PM
To: Sears, Jeremy
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] Moving an application dir ...


Hi,
Since only the buttons are missing, you may try to check the source of 
what is produced by Chameleon to see from where it try to get the 
image.Is it possible that the button_cache_web_path is not properly 
configured in chameleon.xml?

chdir() before everything else in the index.phtml.

The drive letter hardcoding should be done in every configuration file 
(chameleon.xml, index.phtml, php.ini)

Julien

Sears, Jeremy wrote:
> Hi,
> Thanks again for your attention. As I've indicated, the application now
> draws everything except the buttons. Oddly, the buttons get created on the
> new disk, but not drawn. I suspect that chameleon looks for them on the
old
> disk. 
> 
> Does your suggestion to use chdir() still apply? If so can you tell me
from
> where I should call chdir()? Also what config files could have the path
> hardcoded? Ive changed the httpd confs and the chameleon xmls already..
have
> I missed anything.
> 
> Thanks
> Jeremy
> 
> -----Original Message-----
> From: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com]
> Sent: February 28, 2006 4:26 PM
> To: Sears, Jeremy
> Cc: 'chameleon at lists.maptools.org'
> Subject: Re: [Chameleon] Moving an application dir ...
> 
> 
> Hi,
> Let me guess something else.
> Since Chameleon and your application are not on the same disk, it 
> propably cause problems. Since you load the application on a drive (Let 
> say E:/), chameleon thinks from there that it runs on this disk. So when 
> it try to save the web images in the tmp folder, it goes in the E:/ 
> drive. Changing the current directory may solve your problem. To do so, 
> call chdir(/disk/where/your/chameleon/is/installed). You can also 
> hardcode the drive letters in your config files.
> 
> Julien
> Sears, Jeremy wrote:
> 
>>Hi,
>>Thanks for the response. I hadnt considered changing php.ini (its in
>>apache's cgi-bin folder). After changing session.save_path to point to the
>>new disk, my application gets further than before. Most of the application
>>is drawn to the browser however all the button images are broken links,
> 
> and
> 
>>the dataview window hangs. This is better than error msgs. If you have any
>>further thoughts Id like to hear them!
>>
>>Thanks
>>Jeremy
>>
>>
>>
>>-----Original Message-----
>>From: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com]
>>Sent: February 28, 2006 3:25 PM
>>To: Sears, Jeremy
>>Cc: 'chameleon at lists.maptools.org'
>>Subject: Re: [Chameleon] Moving an application dir ...
>>
>>
>>Hi,
>>If I remember correctly, there's 3 place to change path in Chameleon:
>>- chameleon/conf/chameleon.xml
>>- <application/path>/htdocs/index.phtml
>>- php.ini (not sure where it is in ms4w) (search for session_save_path)
>>
>>Julien
>>
>>Sears, Jeremy wrote:
>>
>>
>>>Hi All,
>>>Ive been working through this application moving problem. Ive been making
>>>sleight modifications at each step and then testing the application to
see
>>>what sort of error msgs I get. After copying my appdir, changing the
httpd
>>>conf file, creating /ms4w/tmp/ and /ms4w/tmp/ms_tmp/buttons/ on the new
>>>local disk and modifying my map files to reference abs locations on my
new
>>>disk I get the following error:
>>>
>>>Fatal error: [MapServer Error]: msSaveMap():
>>>(/ms4w/tmp/sess_44048d6c3cfde/1141149037-7978.map) in
>>>D:\ms4w\apps\chameleon\htdocs\common\wrapper\map_session.php on line 295
>>>
>>>I think that the error means that mapserver couldnt write the tmp mapfile
>>
>>to
>>
>>
>>>the tmp session dir on the disk. I suspect that mapserver is still trying
>>
>>to
>>
>>
>>>write to a location on the old disk, rather than the new one. In the
>>
>>process
>>
>>
>>>of running the app, no dir called "sess_44048d6c3cfde" was created on the
>>>old disk (but it has been created on the new one) and so I get the above
>>>noted error. 
>>>
>>>Where in chameleon can I specify to write to the new disk, rather than
the
>>>old? Im thinking that the keyword 'context' is related to this. Nothing
>>
>>from
>>
>>
>>>the archives is jumping out at me when I search on context. Can anyone
>>
>>make
>>
>>
>>>a suggestion? Am I going about this in the wrong way?
>>>
>>>Thanks
>>>Jeremy
>>>
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: chameleon-bounces at lists.maptools.org
>>>[mailto:chameleon-bounces at lists.maptools.org]On Behalf Of Sears, Jeremy
>>>Sent: February 28, 2006 12:11 PM
>>>To: 'chameleon at lists.maptools.org'
>>>Subject: [Chameleon] Moving an application dir ...
>>>
>>>
>>>
>>>Hi all,
>>>
>>>Im having some trouble moving an application's directory. Im running
>>>Chameleon on MS4W, on winXP.
>>>
>>>Originally, I had two directories on my D: drive. MS4W and AppDir. The
>>>appdir contains the htdocs, data etc for my web application. Everything
>>>works fine in this configuration.
>>>
>>>I am attempting to move my appdir to another local disk. I have edited
the
>>>http conf files in my MS4W dir to point to the new appdir location. When
I
>>>load the app in my browser, I get the first page alright (suggesting that
>>>the new http conf files are being read properly) however when I attempt
to
>>>get the app to draw a map, I get the following error:
>>>
>>>FATAL ERROR: Session save path (/ms4w/tmp) doesn't exist or is not
>>
>>writable
>>
>>
>>>Notice: Undefined index: gszSessId in
>>>D:\ms4w\apps\chameleon\htdocs\common\session\session.php on line 162
>>>
>>>I suspect that somwhere in chameleon I have to specify that I want to use
>>>the app on the other local disk. Can anyone tell me what it is that must
>>
>>be
>>
>>
>>>modifyed? Or what I must do in general to move my application to another
>>>local disk and have chameleon function properly?
>>>
>>>Many Thanks
>>>Jeremy
>>>
>>>
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: chameleon-bounces at lists.maptools.org
>>>[mailto:chameleon-bounces at lists.maptools.org]On Behalf Of Eijnden, B.
>>>van den (Bart)
>>>Sent: February 27, 2006 9:32 AM
>>>To: 'chameleon at lists.maptools.org'
>>>Subject: [Chameleon] CWCJSAPI and https
>>>
>>>
>>>Hi list,
>>>
>>>there is a little problem in Chameleon JSAPI mode when using https.
>>>
>>>The iframe which is used has an empty src attribute which makes IE
display
>>>the insecure items alert box. This can easily be fixed by changing:
>>>
>>>     var html = '<iframe name="' + "frame_" + containerName + '"
>>>src""></iframe>'; 
>>>
>>>to:
>>>
>>>     var html = '<iframe name="' + "frame_" + containerName + '"
>>>src="javascript:false;"></iframe>'; 
>>>
>>>I have opened up bug 1306 for this and will take care of the fix.
>>>
>>>http://bugzilla.maptools.org/show_bug.cgi?id=1306
>>>
>>>Best regards,
>>>Bart
>>>
>>>
>>>Disclaimer
>>>************************************************************************
>>>Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
>>>uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
>>>hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
>>>informeren. Wij adviseren u om bij twijfel over de juistheid of de 
>>>volledigheid van de mail contact met afzender op te nemen.
>>>
>>>This message shall not constitute any rights or obligations.
>>>This message is intended solely for the addressee.
>>>If you have received this message in error, please delete it and
>>>notify the sender immediately. When in doubt whether this message
>>>is correct or complete, please contact the sender.
>>>************************************************************************
>>>
>>>_______________________________________________
>>>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
>>>_______________________________________________
>>>Chameleon mailing list
>>>Chameleon at lists.maptools.org
>>>http://lists.maptools.org/mailman/listinfo/chameleon
>>
>>
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list