[Mapserver-users] Re: PHP MapScript
Daniel Morissette
morissette at dmsolutions.ca
Tue Nov 18 06:21:30 PST 2003
Please reply via the list since other Mandrake users may have run into
that and know the solution.... or could also benefit from the solution.
Fraser MacLeod wrote:
> Daniel;
>
> Thanks for the suggestions. I have installed php-cgi (standalone CGI
> version of PHP) and copied the executable into the cgi-bin directory on
> the web server. In addition I have modified the httpd.conf as you
> suggested. When I try and run the sample php script (PHP MapScript 3.5
> By Example HowTo) all I get is the following error message:
>
> Fatal error: Due to thread-safety problems, php_mapscript cannot be used
> as a 'apache2handler' 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
> /var/www/html/terraVX/pda/test.php on line 5
>
Did you restart the Apache server for the changes to take effect?
If you did then the there are 2 possibilities:
- It could be that the php-cgi is not being used for some reason.
Possibly the AddHandler/Action lines that you added to httpd.conf don't
get used, or there is already another handler for the .php and .phtml
extensions that you need to comment out. Make sure the AddType and
Action lines really use type application/x-httpd-php-cgi and *not*
application/x-httpd-php. This is important in order to bypass the
builtin PHP module:
AddType application/x-httpd-php-cgi .php .php3 .php4 .phtml
Action application/x-httpd-php-cgi /cgi-bin/php433
- It could be that the php-cgi is not really compiled as a CGI... I
doubt that's really the case but you could run
'/path/to/cgi-bin/php -i | grep "Server API"'
and confirm that the Server API is "CGI". If not then the problem is
the way the PHP is compiled and you'll need to compile a new one.
HTH
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list