[Mapserver-users] Help with Fatal Error received

P Wilkerson 1wilkerson at charter.net
Fri Apr 16 08:27:34 EDT 2004


I used the PHP Mapscript 4.0 By Example HOWTO document at
http://mapserver.gis.umn.edu/doc40/phpmapscript-byexample-howto.html  and
received the following error...

Fatal error: Due to thread-safety problems, php_mapscript cannot be used as
a 'apache' module. You will have to reconfigure your PHP as a CGI to run
this version of MapScript. See
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI. in
/home/chicora/public_html/map01/europe.php on line 4

File reference: http://secure.gishosting.net/~chicora/map01/europe.php for
error

------------------------------------

The administrator for the site hosting my project has enabled PHP as a CGI
to run
MapScript.   The script returns the phpinfo without reporting any errors.

    <?php  dl("php_mapscript.so");
              phpinfo();
       ?>

Obviously, something is not working right.  Suggestions??

Peter Wilkerson

------------------------------------
Here is the europe.php file:
1. <?php
2. dl('php_mapscript.so');
3. $map_path="/home/chicora/www/map01/";
4. $map = ms_newMapObj($map_path."europe.map");
5. $image=$map->draw();
6. $image_url=$image->saveWebImage();
7. ?>

8. <HTML>
9. <HEAD>
10. <TITLE>Example 1: Displaying a map</TITLE>
11. </HEAD>
12. <BODY>
13.      <IMG SRC=<?php echo $image_url; ?> >
14. </BODY>
15. </HTML>

------------------------------------
Here is the europe.map file:

NAME "Europe in purple"
SIZE 400 400
STATUS ON
# SYMBOLSET "/var/www/html/maps/symbols/symbols.sym"
EXTENT -5696501 1923039 5696501 11022882
UNITS METERS
SHAPEPATH ""/home/chicora/public_html/map01/data1868/1869shp/""

WEB
     IMAGEPATH "/home/chicora/public_html/map01/tmp/"
     IMAGEURL "http://secure.gishosting.net/~chicora/map01/tmp/"
END

LAYER
     NAME "Europe"
     TYPE POLYGON
     STATUS ON
     DATA "europe"
          CLASS
               STYLE
                    COLOR 110 50 100
                    OUTLINECOLOR 200 200 200
                    SYMBOL 0
              END
          END
END

END
------------------------------------

GIShosting.net
MapServer 4.01
Support for PHP 4.3.4




More information about the mapserver-users mailing list