basic user authentication in MapServer using Apache

Norman Barker nbarker at RSINC.COM
Thu Apr 28 12:48:07 EDT 2005


hi,

I am using htpasswd within Apache to create a password file

then with a url such as 
http://localhost/cgi-bin/mapserv?map=/tmp/admin/admin.map ...
I would like a popup to appear depending on the value of map

I have tried .htaccess files and adding basic authentication
to httpd.conf

Has any one done something similar with Mapserver?

The authentication needs to be per map file, since I am defining a map
file per user role/group.

Many thanks,

Norman Barker

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Howard Butler
Sent: Thursday, April 28, 2005 5:16 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on
Windows XP


Bas,

Regarding the SDE depencency in my MapScript builds.... you need to be very
careful to get the exact Python MapScript you need.  As you can see on my
website, there are *four* Python MapScript builds.  At one time, you must
have chosen either the "SDE" or "Full" build, which both have the SDE
dependency.  Use the "Normal" release at all times unless you have a need
(and the dlls) for either SDE or Oracle.

Regarding the extra gdal12.dll's in C:\python23\ and C:\python23\dlls...
The Python uninstaller doesn't deal with dlls in the main sys.prefix
directory very well on Windows (especially in an uninstall-reinstall
cycle).  I've had to manually delete these after an uninstall of Python
MapScript (using the control panel).  Python 2.4 (which I don't provide
builds for) does better at this, and will uninstall dlls in the DLLs
directory.  Uninstall all of the mapscripts that you have using the control
panel and then go into the python23 directory and delete the dlls by
hand.  This will clean up your Python directory.  If you have other
gdal12.dlls, you'll either have to move the PATH, clean them up, or do
something with them as you see fit.

Regarding the issue of not seeing which dll python can't find... run the
python script using a command window (dos prompt), rather than IDLE or
Activestate.  The IDEs swallow the dialog for some reason.

FWTools is more cleanly packaged than my mapscript binaries
<http://fwtools.maptools.org/>.  It comes with its own Python and
everything else you might need.  I suggest you try it if you continue to
have trouble with my binaries.

Howard


At 10:32 AM 4/28/2005, Bas Vanmeulebrouk wrote:
>Frank,
>
>Thank you very much for your reaction. I did rename the one in the
>windows/system32 directory. However, I didn't notice that there were two
>gdal12.dll's in the Python installation directory: one in the root and =
>one
>in the DLLs subdirectory. I have renamed the one in the DLLs =
>subdirectory
>and after that got a different error message (now sde90.dll was =
>missing).=20
>
>This errormessage always appeared, no matter from what location I =
>started
>Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI
>directory. After I had added this directory to the PATH environment
>variable, Python Mapscript was finally working. But does this mean =
>Python
>Mapscript needs some ESRI files? The ones I have came with the =
>installation
>of ESRI MapObjects 2.3.=20
>
>I want to use Python/Mapscript to generate a map and some HTML which can =
>be
>displayed in webbrowser. So I thought I should get a Python/Mapscript =
>script
>which does this to work as a CGI script. I can get Apache to execute a
>Python CGI script, but when I include the line "import mapscript", I get =
>an
>internal server error and the following error messages in the Apache =
>error
>log.=20
>
>Traceback (most recent call last):\n
>    File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, =
>in
>?\n
>      import mapscript\n
>    File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line =
>4,
>in ?\n
>      import _mapscript\n
>ImportError: DLL load failed: The specified module could not be found.\n
>
>I don't have a clue which dll is missing this time. Anyone? Or is there
>another way to achieve this?
>
>Kind regards,
>
>Bas Vanmeulebrouk.=20
>
>-----Original Message-----
>From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]=20
>Sent: Thursday, April 28, 2005 2:19 PM
>To: Bas Vanmeulebrouk
>Cc: MAPSERVER-USERS at lists.umn.edu
>Subject: Re: [UMN_MAPSERVER-USERS] Installing Python Mapscript on =
>Windows XP
>
>
>On 4/28/05, Bas Vanmeulebrouk <bvanmeul at ebe.uct.ac.za> wrote:
> > =20
> > Hi list,
> >  =20
> > I have been trying to get Python Mapscript up and running on MS=20
> > Windows XP, but I haven't succeeded yet. I have downloaded the=20
> > binaries at http://hobu.stat.iastate.edu/mapserver/. When I start=20
> > Python from the directory in which I have installed Python, Mapscript=20
> > works fine. However, if I start Python from another directory, I get=20
> > the following error message when I try import mapscript at the Python=20
> > command line: "The procedure entry point=20
> > ?SetnextByIndex at OGRLayer@@UAEHJ at Z could not be located in the dynamic=20
> > link library gdal12.dll.".
> >  =20
> > I have found four copies of gdal12.dll on my machine. I have been=20
> > exeprimenting with the PATH environment variable, I have renamed the=20
> > various dll's, but the message stays the same.
> >  =20
> > Does anyone have an idea what might be wrong?
>
>Bas,=20
>
>I am guessing that one of the 4 gdal12.dll's is in windows\system32,=20
>right?  This location takes precidence over the PATH, but even higher
>precidence is the directory the program is running in.=20
>
>I would suggest you move or rename the version in windows\system32.=20
>
>Best regards,
>---------------------------------------+--------------------------------
>---------------------------------------+------
>I set the clouds in motion - turn up   | Frank Warmerdam,
>warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list