[mapserver-users] Can't get PHP to work as a CGI.

Ben Logan ben at wblogan.net
Wed Jul 3 18:11:02 EDT 2002


Hello,

I am trying to get PHP to work as a CGI on Redhat 7.1.  It works fine
as a DSO, but I want to use Mapserver 3.6, so...

I followed the directions at
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI
on "Running only PHPMapScript scripts as a CGI," but it isn't working
for me--I always get a 404 error.

I have defined a VirtualHost section in my httpd.conf file which looks
like this:

<VirtualHost 192.168.1.40>
        DocumentRoot /var/www/html/ben/mapserv_demo/local
        <Directory /var/www/html/ben/mapserv_demo/local/cgi>
                Options ExecCGI FollowSymLinks
        </Directory>
        Action pmap-script /cgi/php
        AddHandler pmap-script .pmap
        ServerName map.log.cabin
        ServerAlias map
</VirtualHost>

The permissions on the cgi directory are 750 and it's group is apache.
When I point my browser to http://map/test.pmap (filesystem url:
/var/www/html/ben/mapserv_demo/local/test.pmap), I get a 404 stating
that /cgi/php/test.pmap couldn't be found.  It appears to me that
Apache isn't rewriting the URL or something similar, however I'm not
very familiar with Apache configuration.

I would really appreciate your help, since I can't use Mapscript
without figuring this out (I keep getting random errors).

Thanks,
Ben

-- 
Ben Logan: ben at wblogan dot net
OpenPGP Key KeyID: A1ADD1F0

The hearing ear is always found close to the speaking tongue, a custom
whereof the memory of man runneth not howsomever to the contrary, nohow.



More information about the mapserver-users mailing list