[mapserver-users] php fails on MS4W and Apache

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jun 23 20:15:15 PDT 2008


On 23-Jun-08, at 11:01 PM, Zhao Ying (CDU) wrote:

>
> Thank you!  I’ve tried, it works quite well.
>
> But according to my book, to force Apache to load the CGI version of
> PHP, user must add the following lines in the Apache config file  
> httpd.conf:
>
> AddHandler php-script .php
> Action php-script /cgi-bin/php
>
> Then delete the reference to .php from the AddType line (if it  
> exists), so it looks like this:
> AddType application/x-httpd-php .html .phtml
>
>> By removing .php from the AddType directive, files with this  
> extension will use the CGI version
> of PHP even if the environment contains a DSO version. If you don’t  
> remove the reference,
> then Apache will continue to use the DSO version of PHP to handle  
> documents of type php. “
>
> -- from book <Apress Beginning MapServer Open Source GIS Development>
>
>
> My Questions are:
>
> 1.       Does the procedures described above are required for MS4W?  
> (The book author
> did the illustration on the Linux version of mapserver, I guess so).

not required, as MS4W's apache is already configured for PHP use.

>
> 2.       That loading the PHP Mapscript module in my PHP script  
> dynamically does work,
> but does that mean my server has to load this module repeatedly for  
> every web client
> request? Is there a better solution that apache will load PHP  
> Mapscipt module automatically
> whenever starting?
>

To load the module automatically:
- add the following line around line#650 of /Apache/cgi-bin/php.ini:

	extension=php_mapscript.dll

- then restart apache


---
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080623/ad790774/attachment.htm>


More information about the MapServer-users mailing list