Internal Server Error - UNIX CGI - But not PHP MapScript

Bob Bruce - Programmer covariance at SHAW.CA
Wed Dec 15 00:51:35 EST 2004


My hosting provider has tried to set up MapServer on a UNIX server but we
have run into this problem. I can run the the PHP MapScript MapServerRecipe
examples fine but when I try to run the MapServer CGI I get this problem. I
tried to run the Itasca workshop example and it gave this "Internal Server
Error" so then I tried to run the most basic case of the the CGI in mode=map
and it still gave this error.

The strange thing is that I used exactly the same map with the first PHP
Mapscript MapServerRecipe example and it worked great. After reviewing
similar error reports in the Listserv I cannot come up with a solution, so
I'm asking for help from somebody out there.

My url to attempt to generate the most simple mode=map image is:

http://murals.bighostbox.com/cgi-bin/mapserv?map=/home/m/murals/html/MapServ
erRecipes/hello.map&map_web_imagepath=/home/m/murals/html/tmp/&map_web_image
url=/tmp/&mode=map

(when I send the same URL on my Windows server, with the directory names
changed for the Windows system, it displays the image properly, which leads
me to believe that the map file is OK)

however when I run the php script that uses this same map file:

http://murals.bighostbox.com/MapServerRecipes/hello.phtml

it works OK. The world protection on my html directory is: r-x , the world
protection on my cgi-bin directory is: r-x and the world protection on the
mapserv CGI file in this directory is: r-x. The world protection on the tmp
directory where the map image files are stored is: rwx. So I'm assuming that
the protections are set up OK.

When I run phpinfo() (which you can see by going to:
http://murals.bighostbox.com), I get:

 MapServer Version MapServer version 4.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF
INPUT=EPPL7 INPUT=JPEG INPUT=SHAPEFILE

 PHP MapScript Version ($Revision: 1.220 $ $Date: 2004/11/16 17:23:13 $)

The map file is:
MAP
    NAME HELLO
    STATUS ON
    EXTENT 0 0 4000 3000
    SIZE 400 300
#    IMAGECOLOR 200 255 255
    IMAGECOLOR 255 0 0
        IMAGETYPE GIF
    WEB
        IMAGEPATH "/home/m/murals/html/tmp/"
        IMAGEURL "/tmp/"
#        IMAGEPATH "/var/www/html/tmp/"
#        IMAGEURL "/tmp/"
    END

    LAYER
        NAME "credits"
        STATUS DEFAULT
        TRANSFORM FALSE
        TYPE ANNOTATION
        FEATURE
            POINTS
                200 150
            END
            TEXT 'Hello world.  Mapserver rocks.'
        END
        CLASS
            LABEL
                TYPE BITMAP
                COLOR 0 0 0
            END
        END
    END
END

thanks, in advance, for your help,
                                                     Bob Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041214/29983c29/attachment.html


More information about the mapserver-users mailing list