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

Balkanu GIS gis at balkanu.com.au
Fri Jan 23 02:48:08 EST 2004


Thanks for your replies Tyler & Pericles,

Entering "mapserv.exe -v" did indeed return the output Pericles described
below, so the binary itself seems fine. 

I also thought (as you did Tyler) Apache was trying to display the file
rather than execute it. However, the /cgi-bin/ script alias seems correct.
I'm pretty sure though that it's a problem with the Apache config. I am
unfortunately as good as useless with properly understanding httpd.conf.
Here is the alias section of the file (note I am using here a particular
distribution of PHP/Apache called 'phpdev', hence the nonstandard folder
locations):

    Alias /icons/ "C:/phpdev/apache/icons/"

    <Directory "C:/phpdev/apache/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

Alias /site/ "C:/phpdev/www/phpwebsite_en/"
<Directory "C:/phpdev/www/phpwebsite_en/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    DirectoryIndex index.php index.htm
</Directory>

Alias /maps/ "C:/phpdev/www/maps/"
<Directory "C:/phpdev/www/maps/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    DirectoryIndex index.php index.htm
</Directory>

Alias /tmp/ "C:/phpdev/www/tmp/"
<Directory "C:/phpdev/www/tmp/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    DirectoryIndex index.php index.htm
</Directory>


Alias /forum/ "C:/phpdev/forum/"
<Directory "C:/phpdev/forum/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    DirectoryIndex index.php index.htm
</Directory>


Alias /private/ "C:/phpdev/private/"
<Directory "C:/phpdev/private/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from localhost 127.0.0.1
</Directory>

Alias /public/ "C:/phpdev/www/public/"
<Directory "C:/phpdev/www/public/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    DirectoryIndex index.htm
</Directory>

Alias /phpdev/ "C:/phpdev/phpdev/"
<Directory "C:/phpdev/phpdev/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from localhost 127.0.0.1
    DirectoryIndex index.htm
</Directory>

Alias /phpmyadmin/ "C:/phpdev/phpmyadmin/"
<Directory "C:/phpdev/phpmyadmin/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from localhost 127.0.0.1
    DirectoryIndex index.php
</Directory>


#manuals (if installed)

Alias /apache "C:/phpdev/man/apache/"
Alias /php "C:/phpdev/man/php"
Alias /gtk "C:/phpdev/man/gtk"
Alias /mysql "C:/phpdev/man/mysql"
<Directory "C:/phpdev/man">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from localhost 127.0.0.1
    DirectoryIndex index.html index.html.var index.htm default.htm
default.html
</Directory>


    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
client.
    # The same rules about trailing "/" apply to ScriptAlias directives as
to
    # Alias.
    #
    ScriptAlias /cgi-bin/ "C:/phpdev/www/cgi-bin/"

    #
    # "@@ServerRoot@@/cgi-bin" should be changed to whatever your
ScriptAliased
    # CGI directory exists, if you have that configured.
    #

<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>
</IfModule>


# End of aliases.

==================
Yuri


-----Original Message-----
From: Pericles S. Nacionales [mailto:nacional at cbs.umn.edu] 
Sent: Friday, 23 January 2004 06:16
To: Tyler Mitchell; Balkanu GIS
Cc: Mapserver-users at lists.gis.umn.edu;
mapserver-users-admin at lists.gis.umn.edu
Subject: Re: [Mapserver-users] (newbie): Win32 Apache error when calling
Mapserv.exe


In addition to what Tyler already said, run "mapserv.exe -v" from the
command 
prompt and see if it returns something like:

MapServer version 4.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF 
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

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?

By the way, you might want to upgrade your apache to version 1.3.29 or 
something.  I think there were some security issues on 1.3.27--not good if 
your computer is connected to the rest of this wacky world.

-Perry N.


On Thursday 22 January 2004 10:18 am, Tyler Mitchell wrote:
> Is Apache properly configure to execute files in 
> c:/phpdev/www/cgi-bin/mapserv.exe ? It looks like it is not trying to 
> execute the file, but trying to display the contents.  You may want to 
> first try putting mapserv.exe in c:\program files\apache 
> group\apache\cgi-bin and try it there instead, since the permissions 
> and execution flags are already set in httpd.conf.  Hmm...but you must 
> have change the Alias.  Show us the parts of httpd.conf that you 
> changed.
>
> mapserver-users-admin at lists.gis.umn.edu wrote on 01/21/2004 09:48:20 
> PM:
> > Hi all,
> >
> > I'm just getting started with Mapserver (well, not even that!) - I 
> > have Apache 1.3.27 running on Windows2000 and am trying to run the 
> > Mapserver
>
> 4.0
>
> > demo application.
> >
> > I try to test the MapServer application according to the tutorial 
> > instructions, with the URL http://localhost/cgi-bin/mapserv.exe?
> > And Apache returns the following error 500:
> > [error] Unrecognized character \x90 at c:/phpdev/www/cgi-bin/mapserv.exe
> > line 1.
> >
> > Can anyone give a suggestion what might be wrong?
> >
> > TIA
> >
> > Yuri Banens
> >
> >
> > _______________________________________________
> > 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

-- 
Pericles S. Nacionales
Dept. of Ecology, Evolution & Behavior
College of Biological Sciences
University of Minnesota

e-mail: nacional at cbs.umn.edu
phone: 612 624 6713







More information about the mapserver-users mailing list