<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On 23-Jun-08, at 11:01 PM, Zhao Ying (CDU) wrote:</div></div></div></div></span></div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="ZH-CN" link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">Thank you! &nbsp;I’ve tried, it works quite well.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">But according to my book, to force Apache to load the CGI version of<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">PHP, user must add the following lines in the Apache config file httpd.conf:<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">AddHandler php-script .php<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">Action php-script /cgi-bin/php<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">Then delete the reference to .php from the AddType line (if it exists), so it looks like this:<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">AddType application/x-httpd-php .html .phtml<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">“<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">By removing .php from the AddType directive, files with this extension will use the CGI version<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">of PHP even if the environment contains a DSO version. If you don’t remove the reference,<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">then Apache will continue to use the DSO version of PHP to handle documents of type php. “<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">-- from book &lt;Apress Beginning MapServer Open Source GIS Development><o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">My Questions are:<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="text-indent: -18pt; margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><span>1.<font size="1" face="Times New Roman"><span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span></font></span></span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">Does the procedures described above are required for MS4W? (The book author<o:p></o:p></span></font></div><div style="text-indent: 18pt; margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">did the illustration on the Linux version of mapserver, I guess so).</span></font></div></div></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></div></span></blockquote><div><br></div><div>not required, as MS4W's apache is already configured for PHP use.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="ZH-CN" link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div class="Section1"><div style="text-indent: 18pt; margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p></o:p></span></font></div><div style="text-indent: 18pt; margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="text-indent: -18pt; margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; "><span>2.<font size="1" face="Times New Roman"><span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span></font></span></span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">That loading the PHP Mapscript module in my PHP script dynamically does work,<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">but does that mean my server has to load this module repeatedly for every web client<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">request? Is there a better solution that apache will load PHP Mapscipt module automatically<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size: 9pt; font-family: Arial; color: navy; ">whenever starting?<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font class="Apple-style-span" color="#000080" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div></div></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></div></span></blockquote><br></div><div>To load the module automatically:</div><div>- add the following line around line#650 of /Apache/cgi-bin/php.ini:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>extension=php_mapscript.dll<br></div><div><br></div><div>- then restart apache</div><div><br></div><div><br></div><div><div>---</div><div>Jeff McKenna</div><div>FOSS4G Consulting and Training Services</div><div><div><a href="http://www.gatewaygeomatics.com/">http://www.gatewaygeomatics.com/</a></div></div><div><br></div></div></body></html>