[Mapserver-users] Re: PHP MapScript

Fraser MacLeod fraserm at terravistaltd.com
Tue Nov 18 10:09:44 EST 2003


Daniel;

Have followed the suggestions that you make. I have checked the
httpd.conf:

AddType  application/x-httpd-php         .php .php4 .php3
AddType  application/x-httpd-php-cgi  .phtml
AddType  application/x-httpd-php-source  .phps
AddHandler phtml-script .phtml
Action phtml-script /cgi-bin/php-cgi
Action application/x-httpd-php-cgi /cgi-bin/php-cgi

These are the only entries (some of them come from the wiki on
PHPMapscript)

I have checked the the php-cgi and get the following:

<tr><td class="e">Server API </td><td class="v">CGI </td></tr>

As a result I have built a new version of php (4.3.4) from source and
copied the cgi executable to the web server. Still no joy.

 

On Tue, 2003-11-18 at 14:21, Daniel Morissette wrote:
> 
> 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




More information about the mapserver-users mailing list