[Chameleon] CWC2 and PROJ

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Wed Oct 12 10:00:46 EDT 2005


Debbie,

> We tried setting a PROJ_LIB system variable (We're on a Windows > 2003server) but that didn't seem to have any affect whatsoever. Is > it necessary to reboot the server after setting a system variable?

Yes, it is necessary to reboot unfortunately. I had a similar thing a few weeks ago.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> "Pagurek,Debbie [NCR]" <Debbie.Pagurek at ec.gc.ca> 10/12/05 3:43 PM >>>
Paul,
We could definitely alter the cwc2.php script because we already have
been doing that, but I don't know how to set the CONFIG property here -
I tried the following but got an error. Is it even possible to set the
CONFIG in a mapfile via php/mapscript? 

$oApp->moMapSession->oMap->set('CONFIG','PROJ_LIB "C:/ms4w/proj/nad/"'
);

Fatal error: Property 'CONFIG' does not exist in this object. in
C:\ms4w\apps\chameleon\cwc2\htdocs\cesicwc2.php on line 716

Any other suggestions? I thought that maybe cwc2 used some sort of
default.map that is stored as a file and then alters that base mapfile.
That would be ideal because then we could just tweak the base mapfile.
But no - that doesn't seem to be what it does - it just writes out a
mapfile from scratch. 
Any other suggestions? 

We tried setting a PROJ_LIB system variable (We're on a Windows 2003
server) but that didn't seem to have any affect whatsoever. Is it
necessary to reboot the server after setting a system variable?

Obviously our final option is just putting the proj directory in c:, but
yuck - that's not where we want it.

Debbie

-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Paul Spencer
Sent: Tuesday, October 11, 2005 10:48 PM
To: Avramov,Daniel [Ontario]
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] CWC2 and PROJ


Daniel,

I believe you might be able to put this into an apache SetEnv  
directive and get it to work, and you might be able to do the same  
for IIS (but I would have no clue how to do that!).  Unfortunately,  
as is, cwc2 builds a map object entirely using mapscript and doesn't  
provide the opportunity to do this.  It would probably be an easy  
hack to add it into your cwc2.php though.  You would probably want to  
do it around line 711 where the imageurl and imagepath is set.   
Ultimately, this would become a setting in cwc2.xml ...

Cheers

Paul

On 11-Oct-05, at 4:54 PM, Avramov,Daniel [Ontario] wrote:

> We've been experiencing issues with getting the PROJ_LIB working
> properly
> If we put the proj directory in c:\    cwc2 will work fine but we  
> want it in another directory/drive.
>
> cwc2 builds its own MapFile and doesn't write CONFIG PROJ_LIB ...
> out into that MapFIle.
> Is it possible to use php_mapscript to write to that MapFile to set  
> the config proj_lib appropriately?
>
> OR
>
> Does Chameleon / cwc2 use a base Mapfile or code that can be
> altered that we could add the config proj_lib setting to so that  
> cwc2 will work?
>
> Would the following code placed in the proper file do anything to
> help?
> putenv( "PROJ_LIB=e:\mapapps\ms461_c22_php4311\proj\nad" );
>
>
> Thanks,
> Daniel and Debbie.
>
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+




_______________________________________________
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