[mapserver-users] PHP/Mapscript Installation Help

Steven Bowden steveb at bundaberg.qld.gov.au
Tue Jun 4 01:59:08 EDT 2002


Hi List,
Hopefully somebody can point me in the right direction to help me get
php/mapscript compiled and running correctly.  I have managed to get
mapserver up and running but I just can't seem to get mapscript to work.

This is what I am using as installed from RedHat 7.3:
apache-1.3.23-11
php-4.1.2-7
and
mapserver-3.6.0

My configuration options for mapserver are:
./configure --with-pdf --with-proj --with-postgis
--with-php=/usr/include/php --with-apxs --without-ttf

>From what I can tell php was configured with the correct options.
It has the options included:
--with-regex=system
--with-apxs=/usr/sbin/apxs
(All the options were displayed at the start of phpinfo())

In order to get mapscript to compile I have to edit the Makefile in the
mapscript/php3 directory.
This is the line produced from the configure script:
CC =     gcc  gcc -I. -I.. -fPIC
I have to change it to
CC =     gcc -I. -I.. -fPIC
Should I have to edit this file? Is there anything else that I might
need to change? 

I then put mapserv and php_mapscript.so into the relevant directories.
I can access the phpinfo_mapscript.phtml and it says that the module is
loaded. ie:
MapScript Version ($Revision: 1.104 $ $Date: 2002/04/24 20:37:32 $)
MapServer version 3.6.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
INPUT=POSTGIS INPUT=SHAPEFILE

I then modify the test_draw_map.phtml file to point to my working .map
file.  When I access this page it then gives me a fatal error due to
thread safety problems and points me to the following url.
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI

I then follow the instruction for running only php/mapscript scripts as
CGI.
After I have made all of the changes to httpd.conf and restarted httpd I
try and access the test_draw_map.phtml again and I get the following
error messages:
Warning: Unexpected character in input: '' (ASCII=4) state=1 in
/usr/bin/php on line 6081
Warning: Unexpected character in input: ' in /usr/bin/php on line 6082
Warning: Unexpected character in input: '' (ASCII=4) state=1 in
/usr/bin/php on line 6082
Warning: Unexpected character in input: '' (ASCII=4) state=1 in
/usr/bin/php on line 6083
Warning: Unexpected character in input: '' (ASCII=28) state=1 in
/usr/bin/php on line 6084
Parse error: parse error in /usr/bin/php on line 6084

I have been bashing about with this for about the last week and not
getting anywhere.  If I want to use mapscript should I down grade to 
php 4.0.6 and mapserver 3.5 as mentioned in the php/mapscript
installation howto???

Regards
Steven Bowden
GIS Officer
Bundaber City Council








More information about the mapserver-users mailing list