[Mapserver-users] (newbie): Win32 Apache error when callingMapserv.exe

Pericles S. Nacionales nacional at cbs.umn.edu
Tue Jan 27 01:04:53 EST 2004


Yuri,

I'd recommend leaving the options to "ExecCGI" only...  unless you plan
to show everyone what files are in your cgi-bin directory.

As for the mod_perl module bit, it's telling apache to allow only perl
scripts to be executed.  You let the other executables run by commenting
it out.  I suggest moving the mod_perl module block to a section on its
own--perhaps at the end of the configuration file.  This way, apache
would still be able to handle mod_perl scripts.

As for your mapfile, mapserv.exe is accessing your mapfile locally and
not through the Web.  So, make sure you're pointing to your local path
(i.e. C:/directory/to/mapfile.map) and not the alias (virtual directory)
in apache.  What you need to do is edit demo_init.html and replace the
line: <input type="hidden" name="map" value="/maps/ms_demo/demo.map">
with: <input type="hidden" name="map"
value="C:/phpdev/www/maps/ms_demo/demo.map">

You also want to make sure that your imagepath and imageurl are like
these:
<input type="hidden" name="map_web_imagepath"
value="C:/phpdev/www/tmp/">
<input type="hidden" name="map_web_imageurl" value="/tmp/">

Lastly, make sure that everyone can read and write (but not execute) on
C:/phpdev/www/tmp/.  Now reload demo_init.html...

Good luck!
-Perry

On Mon, 2004-01-26 at 21:21, Balkanu GIS wrote:
> Thank you again Tyler & Pericles,
> 
> I changed "Options All MultiViews" to "Options ExecCGI" without apparent
> success, but commenting out the <IfModule></IfModule>... block did the
> trick! The unfortunate thing is that I don't know why...
> 
> Nevertheless Mapserve.exe was able to respond. Having opened
> ".../ms_demo/demo_init.html" and clicked on "Initialize" to send the
> starting parameters to MapServer, I am presented with the error:
> "msLoadMap(): Unable to access file. (/maps/ms_demo/demo.map)"
> 
> I suppose this is most likely a permissions error, again probably a result
> of my mauling of httpd.conf. The file is most certainly in that location,
> but cannot be opened. I'm supposing that the function "msLoadMap()" is
> contained in the MapServer application.
> 
> Should I be allowing localhost/127.0.01 access to "/maps/ms_demo/" through
> httpd.conf?
> 
> -Yuri
> 
> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of Pericles S.
> Nacionales
> Sent: Tuesday, 27 January 2004 07:55
> To: Tyler Mitchell
> Cc: Balkanu GIS; Mapserver-users at lists.gis.umn.edu
> Subject: RE: [Mapserver-users] (newbie): Win32 Apache error when
> callingMapserv.exe
> 
> 
> Tyler,
> 
> Thanks for coming back to this.  I found a few more inconsistencies with the
> configuration file.  Those last two lines might actually be ok--there might
> be a beginning <IfModule mod_alias.c> tag somewhere above the beginning of
> the snippet Yuri sent us.
> 
> What I would try then, Yuri, is comment out the <IfModule
> mod_perl.c></IfModule> block:
> 
> ...
> <Directory "C:/phpdev/www/cgi-bin">
> 
> #<IfModule mod_perl.c>
> #  Sethandler perl-script
> #  PerlHandler Apache::Registry
> #  PerlSendHeader On
> #  </IfModule>
>   Options All MultiViews
>     AllowOverride None
>         Order deny,allow
>         Allow from all
>     </Directory>
> ...
> 
> Oh, one more thing...  Perhaps this is all you need to do.  Change "Options
> All MultiViews" to "Options ExecCGI".  Hah!  I just saw the line above.  I
> bet that's all you need to do.
> 
> -Perry
> 
> On Mon, 2004-01-26 at 14:10, Tyler Mitchell wrote:
> > 
> > 
> > 
> > I'm always cutting/pasting apache.conf directory code, do his cgi-bin 
> > properties look good to go with executables?
> > 
> > mapserver-users-admin at lists.gis.umn.edu wrote on 01/23/2004 12:09:29 
> > AM:
> > 
> > > Yuri,
> > >
> > > Check the last two lines of your apache config snippet...
> > >
> > > >     </Directory>
> > > > </IfModule>
> > >
> > > If this is how they appear in your config file, switch them.
> > >
> > >   </IfModule>
> > > </Directory>
> > >
> > > This could be the cause of your problem.
> > >
> > > > If not, something is wrong with your executable.  But then again 
> > > > it
> > could
> > > > just
> > > > be permission problems.  Or perhaps you've locked down your 
> > > > CGI-BIN directory so that only scripts with certain extensions 
> > > > would run?
> > >
> > > -Perry N.
> > >
> > > --
> > > "He's no geek.His tan's too good." -Benjamin Choate
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > 
> > _______________________________________________
> > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
-- 
"He's no geek.His tan's too good." -Benjamin Choate




More information about the mapserver-users mailing list