Discussion:
[mapserver-users] setenv MS_MAPFILE not working
asle
2009-02-25 22:13:07 UTC
Permalink
Hi,
I have just setup and am running mapserver 5 on OS X Server 10.5. I have
tried to set this in an include conf file:
SetEnv Request_URI "/cgi-bin/demo" MS_MAPFILE=/MS/apps/demo/demo.map
SetEnv Request_URI "/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log

but it is not working. The mapserver excecutable is called "demo". I have a
catalog in webroot called "MS" which is the domains webfolder. I have a
folder in there with the structure like above with the demo.map in the demo
folder. Still if I write the URL: http://domainname../cgi-bin/demo I get
No query information to decode. QUERY_STRING is set, but empty. If I use
this URL it works,
http://borchbio.no/cgi-bin/mapserv?map=/Library/WebServer/Documents/MS/apps/demo/demo.map&layer=n5byggflate&mode=map
except I get another error which is another problem. Now I just want to get
the shortcut to work. Are these paths relative to the drive root or to the
apache root (/Library/WebServer/Documents/)?
Thanks!
--
View this message in context: http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2386468.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Daniel Morissette
2009-02-25 22:32:14 UTC
Permalink
Post by asle
I have just setup and am running mapserver 5 on OS X Server 10.5. I have
SetEnv Request_URI "/cgi-bin/demo" MS_MAPFILE=/MS/apps/demo/demo.map
SetEnv Request_URI "/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log
Did you mean to use SetEnvIf instead of SetEnv? i.e.

SetEnvIf Request_URI "/cgi-bin/demo" MS_MAPFILE=/MS/apps/demo/demo.map
SetEnvIf Request_URI "/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log

Daniel
--
Daniel Morissette
http://www.mapgears.com/
asle
2009-02-26 09:57:11 UTC
Permalink
Yes, of course I miswrote that. This should be correct?
SetEnvIf Request_URI "/cgi-bin/demo" MS_MAPFILE=/MS/apps/demo/demo.map
SetEnvIf Request_URI "/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log

But I still get the same error when I type the URL
http://domainname.../cgi-bin/demo
No query information to decode. QUERY_STRING is set, but empty.
--
View this message in context: http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2388730.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Rahkonen Jukka
2009-02-26 10:35:15 UTC
Permalink
Hi,

This is not an error. You do not ask Mapserver to do anything for you, therefore it answers "QUERY_STRING is set, but empty." Add something reasonable to the query and you may start seeing something. You can start by addind
?mode=map&layers=all
and sending the query from browser.

-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähetetty: 26. helmikuuta 2009 11:57
Aihe: Re: [mapserver-users] setenv MS_MAPFILE not working
Yes, of course I miswrote that. This should be correct?
SetEnvIf Request_URI "/cgi-bin/demo"
MS_MAPFILE=/MS/apps/demo/demo.map SetEnvIf Request_URI
"/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log
But I still get the same error when I type the URL
http://domainname.../cgi-bin/demo No query information to
decode. QUERY_STRING is set, but empty.
--
http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2
388730.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
asle
2009-02-26 10:48:13 UTC
Permalink
Thanks,
I thought that setenvif should fix that but I understand it needs some more
info. When I then enter
http://domainname.../cgi-bin/demo?mode=map&layers=all
I then get this error:
loadMap(): Web application error. CGI variable "map" is not set.
so it seems it could be my path is not set correctly in my mapserv.conf
(http). Is the pathe in SETENVIF local or from the webroot for apache or
webroot for the domain?

/asle
Post by Rahkonen Jukka
Hi,
This is not an error. You do not ask Mapserver to do anything for you,
therefore it answers "QUERY_STRING is set, but empty." Add something
reasonable to the query and you may start seeing something. You can start
by adding
?mode=map&layers=all
and sending the query from browser.
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähetetty: 26. helmikuuta 2009 11:57
Aihe: Re: [mapserver-users] setenv MS_MAPFILE not working
Yes, of course I miswrote that. This should be correct?
SetEnvIf Request_URI "/cgi-bin/demo"
MS_MAPFILE=/MS/apps/demo/demo.map SetEnvIf Request_URI
"/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log
But I still get the same error when I type the URL
http://domainname.../cgi-bin/demo No query information to
decode. QUERY_STRING is set, but empty.
--
http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2
388730.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
View this message in context: http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2388949.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Rahkonen Jukka
2009-02-26 10:57:00 UTC
Permalink
I am having a full physical path there
MS_MAPFILE=d:/data/maps/test.map

-Jukka-
-----Alkuperäinen viesti-----
Lähetetty: 26. helmikuuta 2009 12:48
Aihe: Re: [mapserver-users] setenv MS_MAPFILE not working
Thanks,
I thought that setenvif should fix that but I understand it
needs some more info. When I then enter
http://domainname.../cgi-bin/demo?mode=map&layers=all
loadMap(): Web application error. CGI variable "map" is not set.
so it seems it could be my path is not set correctly in my
mapserv.conf (http). Is the pathe in SETENVIF local or from
the webroot for apache or webroot for the domain?
/asle
Post by Rahkonen Jukka
Hi,
This is not an error. You do not ask Mapserver to do anything for
you, therefore it answers "QUERY_STRING is set, but empty." Add
something reasonable to the query and you may start seeing
something.
Post by Rahkonen Jukka
You can start by adding ?mode=map&layers=all and sending the query
from browser.
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähetetty: 26. helmikuuta 2009 11:57
Aihe: Re: [mapserver-users] setenv MS_MAPFILE not working
Yes, of course I miswrote that. This should be correct?
SetEnvIf Request_URI "/cgi-bin/demo"
MS_MAPFILE=/MS/apps/demo/demo.map SetEnvIf Request_URI
"/cgi-bin/demo" MS_ERRORFILE=/MS/apps/demo/ms.log
But I still get the same error when I type the URL
http://domainname.../cgi-bin/demo No query information to decode.
QUERY_STRING is set, but empty.
--
http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2
388730.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2
388949.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
asle
2009-02-26 13:48:39 UTC
Permalink
I tried full physical path but it does not work. What would be correct paths
for the file on OS X. Any Idea?
This is OS X Server 10.5.6 running Apache 2.2. Here is the included conf
file:

Alias /demo "/Library/WebServer/Naturkart/kulturminnekart/apps/demo/"
# set directory defaults for the above mapping

<Directory "/Naturkart/kulturminnekart/apps/demo/">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>

SetEnvIf Request_URI "/cgi-bin/demo"
MS_MAPFILE=/Library/WebServer/Documents/Naturkart/kulturminnekart/apps/demo/demo.map
SetEnvIf Request_URI "/cgi-bin/demo"
MS_ERRORFILE=/Library/WebServer/Documents/Naturkart/kulturminnekart/apps/demo/ms.log
Post by Rahkonen Jukka
I am having a full physical path there
MS_MAPFILE=d:/data/maps/test.map
-Jukka-
--
View this message in context: http://n2.nabble.com/setenv-MS_MAPFILE-not-working-tp2386468p2389693.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Loading...