[maplab-users] Php/CGI - MapLab problem

David Graham
Wed, 31 Jul 2002 08:43:24 -0600
Dear Daniel and others:

I have actually solved the problem with the Php executable shipped with 
RedHat.  I am not sure exactly if this was a configuration problem when 
the Php was compiled or if it is simply an Apache configuration problem.

But anyone is having a similar issue here is how to solve it.

Add the following cgi to your cgi-bin and use it to run php.


It appears that when Apache executes the RedHat php cgi it passes 
SCRIPT_FILENAME as /var/www/cgi-bin/php and PATH_TRANSLATED is the name 
of the php script /var/www/maplab/htdocs/index.phtml.  The php cgi on 
the other hand does not execute against PATH_TRANSLTED it executes 
against SCRIPT_FILENAME.  The result is if you use the RedHat 
Apache/Php-CGI in the default configuration, every time the Php CGI 
executes, it uses itself (a binary file) as the input file to translate. 
 And then it spews garbage because it is trying to parse a binary file.

This seems to work to get the PHP going.  I now seem to have some 
problems with mapscript segfaulting but I suspect that has more to do 
with my use of MapScript 3.7 alpha with 24bit output than with the 
MapLab code.

Dave Graham

David W. Graham
Director of Geospatial Applications Development
information integration and imaging, LLC
201 Linden St, Third Floor
Fort Collins, CO 80524
(970) 482-4400

This archive was generated by Pipermail.