[Mapserver-users] PHP mapscript as CGI

Matt Doggett mdoggett at coas.oregonstate.edu
Wed Mar 12 13:11:31 PST 2003


New user to MapServer and I'm following the instructions online to
compile PHP4 and Mapserver3.6 so that PHP mapscripts are run as CGI.
Details:
RedHat Linux 8.0
Apache 2.0
Mapserver 3.6
PHP4.2

- PHP installs and php scripts run without a problem
- The php CGI executable works fine.  I can test it from the command
line to make sure it functions and returns text/html. This program is
placed in my webserver CGI directory (/var/www/cgi-bin).
- Mapserver installs and runs without a problem.  I have successfully
tested the demo maps.

I made the following references in my httpd.conf ( with no other
references to .phtml):
AddType  application/x-httpd-php-cgi .phtml
Action application/x-httpd-php-cgi /cgi-bin/phtml

BUT.
- Whenever I try to access a mapscript file (.phtml) using the php CGI
program, my browser displays a bunch of garbage characters...as if the
browser is trying to display the cgi binary, not the results of running
it.

Any suggestions??

Matt Doggett
Spatial Climate Analysis Service
Oregon State University
316 Strand Ag Hall
Corvallis, OR 97331
(541)737-9153
mdoggett at coas.oregonstate.edu
 





More information about the MapServer-users mailing list