[mapserver-users] request help configuring php mapscript as cgi within apache redhat 7.3

David Armstrong david.armstrong at ntlworld.com
Mon Sep 9 13:01:04 PDT 2002


Help!
could someone please cast an eye over my attempted setup configuring for
mapscript
i have followed the notes on the Wiki regarding setting up but to no avail.

all help and guidance appriciated

Thanks
Richard Armstrong

Using:
Redhat 7.3
PHP 4.1.2

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Original part in the httpd.conf:

    <IfModule mod_php4.c>
        AddType application/x-httpd-php .php .php4 .php3
        AddType application/x-httpd-php-source .phps
    </IfModule>


Revised section:


    ## removed .phtml
    <IfModule mod_php4.c>
        AddType application/x-httpd-php .php .php4 .php3
        AddType application/x-httpd-php-source .phps
    </IfModule>

    Action phtml-script /cgi/php
    AddHandler phtml-script .phtml

    <Directory /var/www/html/mapscript/cgi>
        Options ExecCGI FollowSymLinks
    </Directory>


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


set up the cgi folder and permissions in /var/www/html/mapscript set as:

mkdir cgi
chgrp apache ./cgi (some distributions call the 'apache' group 'nobody')
chmod 750 ./cgi

created the link:

ln -s /usr/bin/php /var/www/html/mapscript/cgi/php

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

the php exectuable is in /usr/bin/php
using a test.phtml in /var/www/html/mapscript/ still gives 404 error like:

The requested URL /cgi-bin/php/cgi/php/mapscript/test.phtml was not
found on this server.
or
The requested URL /cgi-bin/php/mapscript/test.phtml was not found on
this server.












More information about the MapServer-users mailing list