Hi Norm, <br><br>Yes, I changed fgs-dev/pkg_def/php/fgs_build file, but the changes are only about (1) disable mysql support (2) enable debug mode which were discussed in our previous emails. I opened this fgs_build file and noticed the following section:<br>
<br>## need to verify that MapServer version is greater than or equal to 4.5 <br>## if yes compile php as an Apache module <br>
## if version is 5.0 and up compile as an Apache module <br>if [ -e $MS_SRC_PATH/map.h ] ; then<br>
MS_VERSION=`grep VERSION $MS_SRC_PATH/map.h | cut -d'"' -f2 `<br><br> if [ `echo $MS_VERSION | cut -d'.' -f1` -eq 4 ] ; then<br> [ `echo $MS_VERSION | cut -d'.' -f2` -ge 5 ] && PHP_AS_APACHE_MODULE=y<br>
fi<br>elif [ -e $MS_SRC_PATH/mapserver.h ] ; then<br> PHP_AS_APACHE_MODULE=y<br>fi<br><br>APACHE_VERSION=`grep ^apache: $FGS_DEV_HOME/build.list | cut -d: -f3`<br>APACHE_VERSION_MAJOR=`echo $APACHE_VERSION | cut -d. -f1`<br>
<br>if [ "$PHP_AS_APACHE_MODULE" = 'y' ] ; then<br> echo "* Building against mapserver >= 4.6, we can use PHP as an Apache module"<br> OPTIONS="$OPTIONS --enable-cgi --enable-force-cgi-redirect"<br>
<br> if [ ${APACHE_VERSION_MAJOR} = '1' ] ; then<br> OPTIONS="$OPTIONS --with-apxs=$FGS_BUILD_HOME/apache/bin/apxs"<br> else<br> OPTIONS="$OPTIONS --with-apxs2=$FGS_BUILD_HOME/apache/bin/apxs"<br>
fi<br>else<br> OPTIONS="$OPTIONS --enable-cgi --enable-force-cgi-redirect"<br>fi<br><br>No matter "$PHP_AS_APACHE_MODULE" = 'y' or not, always has OPTIONS="$OPTIONS --enable-cgi --enable-force-cgi-redirect". Is this correct behavior?<br>
<br>Regards,<br>Hao<br><br><br><div class="gmail_quote">On Wed, Nov 18, 2009 at 4:18 PM, Normand Savard <span dir="ltr"><<a href="mailto:nsavard@mapgears.com">nsavard@mapgears.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hao,<br>
<br>
Answer inline.<div class="im"><br>
<br>
Regards,<br>
<br>
Norm<br>
<br>
Hao Zhang wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There is no php5 in my cgi-bin ($FGS_HOME/www/cgi-bin/). I checked your FGS (1.0), there is no php5 in the cgi-bin as well. I compared php5.conf files:<br>
<br>
[Your version - FGS 1.0]:<br>
AddType application/x-httpd-php .php .phtml<br>
LoadModule php5_module libexec/libphp5.so<br>
DirectoryIndex index.php index.phtml<br>
PassEnv PHPRC<br>
<br>
</blockquote></div>
This indicates that PHP is compiled as a module. This is the normal configuration of this package. You could see this in the fgs_build of this package.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[My version]:<br>
AddType application/x-httpd-php5 .php .phtml<br>
Action application/x-httpd-php5 /cgi-bin/php5<br>
DirectoryIndex index.php index.phtml<br>
PassEnv PHPRC<br>
<br>
</blockquote></div>
PHP is compiled as a cgi. Somehow it happens that the conf file "php.conf-php_as_cgi" is executed instead of "php.conf-php_as_module".<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, I cannot find libphp5.so anyway in my $FGS_HOME (no $FGS_HOME/www/libexec at all!). Do you think it is because php is built or configured wrong?<br>
<br>
</blockquote></div>
Did you change something in your fgs_build? You could check how php is compiled in your php/config.log and php/config.status.<br>
</blockquote></div><br>