Changes between Initial Version and Version 1 of RedHat8AndMapserver37


Ignore:
Timestamp:
Jan 26, 2009, 11:10:56 AM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RedHat8AndMapserver37

    v1 v1  
     1= RedHat8AndMapserver37 =
     2
     3== Known Problems ==
     4
     5    17 March 2004
     6
     7A solution to the problem below is to edit php.ini:
     8
     9{{{
     10 # cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
     11 # previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
     12 # what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
     13 # this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
     14 # of zero causes PHP to behave as before.  Default is zero.  You should fix your scripts
     15 # to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
     16 cgi.fix_pathinfo = 1
     17}}}
     18
     19    27 June 2003
     20
     21          o Sometimes when compiling PHP with the ./configure options outlined below (particularly the --enable-discard-path), a problem arises with PHP. When you run phpinfo() PHP produces error's like:
     22
     23         **Warning: Unexpected character in input: '' (ASCII=24) state=1 in
     24         **/var/www/cgi-bin/php on line 686
     25
     26         ***Warning: Unexpected character in input: '' (ASCII=8) state=1 in
     27         ***/var/www/cgi-bin/php on line 686
     28         ***...
     29         ***Parse error: parse error in /usr/local/apache/cgi-bin/php
     30
     31         As a work around to this problem you can compile PHP without the --enable-discard-path option and it seems to work fine. Please be aware
     32         that this option provides the following functionality and leaving this option from the configure string disables this:
     33
     34         --enable-discard-path   If this is enabled, the PHP CGI binary can safely be placed outside of the web tree and people
     35         will not be able to circumvent .htaccess security."
     36
     37    06 APR 2003
     38
     39          o There appears to be a problem with threads. gc
     40          o The PHP-4.3.0 bug appears to be fixed in 4.3.2RC1. I've not checked for a later version (yet). gc
     41
     42    20 Feb 2003
     43
     44          o There is a problem that PHP/Mapscript? process does not terminate or take a long time to terminate. - no work around at this time
     45          o If you are using OUTPUTFORMAT descriptions, you need to have an IMAGETYPE <type> command in your mapfile or it will select some internal default - probably not what you want. This should change shortly in CVS.
     46          o PHP-4.3.0 has a serious security issue, you should use PHP-4.3.1
     47          o PHP-4.3.x built as a CGI module (required for mapscript) has a bug that causes PHP_SELF to get clobbered. This should be fixed in CVS and PHP-4.3.2. I fixed this by creating an auto_prepend.php file the contained:
     48
     49<?php
     50///// Quick fix until the PHP guys fix $_SERVER['PHP_SELF'] /////
     51$_SERVER['SCRIPT_NAME'] = substr($_SERVER['PATH_TRANSLATED'],
     52strlen($_SERVER['DOCUMENT_ROOT']));
     53
     54if (substr($_SERVER['SCRIPT_NAME'], 0, 2) == '//') {
     55   $_SERVER['SCRIPT_NAME'] = substr($_SERVER['SCRIPT_NAME'], 1);
     56}
     57
     58$PHP_SELF = $SCRIPT_NAME = $_SERVER['PHP_SELF'] =
     59$_SERVER['SCRIPT_NAME'];
     60/////////////////////////////////////////////////////////////////
     61?>
     62
     63== Build Notes ==
     64
     65# Here are my build notes for installing Mapserver et al on RH 8.0
     66# many thanks to Vincent Schut for his build notes
     67
     68
     69# removed these and dependent rpms
     70  rpm -e gd
     71  rpm -e curl-7.9.8-1
     72  rpm -e curl-devel-7.9.8-1
     73  rpm -e php
     74
     75# already have rpm installed
     76  rpm -q libpng-1.2.2-8
     77  rpm -q libpng-devel-1.2.2-8
     78  rpm -q libjpeg-6b-21
     79  rpm -q libjpeg-devel-6b-21
     80
     81# installed
     82  rpm -i pdflib-4.0.1-1.i386.rpm
     83
     84# download and build ming
     85tar xzf ming-0.2a.tgz
     86cd ming-0.2a
     87make
     88make static
     89make install
     90
     91# download and build curl
     92tar xzf curl-7.10.3.tar.gz
     93cd curl-7.10.3
     94./configure
     95make
     96make install
     97
     98# add /usr/local/lib to /etc/ld.so.conf
     99/sbin/ldconfig
     100
     101# download and install gd-2 into /usr/local
     102rm -f /usr/lib/libgd.*     # to remove any potentially conflicts
     103tar xzf gd-2.0.11.tar.gz
     104cd gd-2.0.11
     105./configure
     106make
     107make install
     108
     109# download and install gdal-1.1.8
     110tar xzf gdal-1.1.8.tar.gz
     111cd gdal-1.1.8
     112./configure \
     113  --with-libz \
     114  --with-png \
     115  --with-libtiff=internal \
     116  --with-geotiff=internal \
     117  --with-jpeg \
     118  --without-jasper \
     119  --without-python
     120make
     121make ogr-all
     122make install
     123
     124/sbin/ldconfig
     125
     126# download and build php-4.3.0
     127tar xzf php-4.3.0.tar.gz
     128cd php-4.3.0
     129rm -f config.cache
     130./configure \
     131  --enable-force-cgi-redirect \
     132  --enable-discard-path \
     133  --with-config-file-path=/etc/httpd/ \
     134  --with-gd=/usr/local \
     135  --with-jpeg-dir \
     136  --with-png-dir \
     137  --with-zlib-dir \
     138  --with-freetype-dir \
     139  --without-ttf \
     140  --with-pdflib \
     141  --with-mysql \
     142  --with-regex=system \
     143  --with-ming \
     144  --enable-dbase \
     145  --enable-dbx \
     146  --enable-versioning
     147
     148
     149make
     150cp sapi/cgi/php /var/www/cgi-bin
     151make install
     152cp php.ini-dist /etc/httpd/php.ini
     153# change the following as appropriate
     154diff /etc/httpd/php.ini php.ini-dist
     155423c423
     156< extension_dir = /etc/httpd/php_mods
     157---
     158> extension_dir = ./
     159
     160
     161# download and build proj libraries
     162tar xzf proj-4.4.5.tar.gz
     163cd proj-4.4.5/nad
     164tar xzf ../../proj-nad27-1.1.tar.gz
     165cd ..
     166./configure
     167make
     168make install
     169
     170/sbin/ldconfig
     171
     172
     173# download and build mapserver-3.7
     174
     175tar xzf mapserver-3.7.tgz
     176cd mapServer-3.7
     177rm -f config.cache
     178./configure \
     179  --without-tiff \
     180  --without-eppl \
     181  --without-jpeg \
     182  --with-threads \
     183  --with-proj \
     184  --with-gdal=/usr/local/bin \
     185  --with-php=../php-4.3.0 \
     186  --with-gd=/usr/local \
     187  --with-freetype=/usr/bin \
     188  --with-pdf \
     189  --with-ogr \
     190  --with-gdal \
     191  --with-ming \
     192  --with-wmsclient \
     193  --with-wfs \
     194  --with-wfs-client
     195
     196# I got an undefined "_snprintf" which required changing
     197# mswmslayer.c to  #include <stdio.h>
     198# and replace "_snprintf" with "snprintf"
     199
     200make
     201# DO NOT do a "make install"
     202
     203cp legend mapserv scalebar /var/www/cgi-bin
     204cp mapscript/php3/php_mapscript.so /etc/httpd/php_mods/
     205
     206# add to /etc/httpd/conf/httpd.conf
     207
     208#
     209# For PHP scripts as CGI-BIN
     210#
     211AddType application/x-httpd-php-cgi .php .php4 .phtml
     212Action  application/x-httpd-php-cgi /cgi-bin/php
     213
     214/etc/rc.d/init.d/httpd restart
     215
     216# create /var/www/html/info.php
     217<?php
     218dl("php_mapscript.so");
     219phpinfo();
     220?>
     221
     222# check the output of http://yourhost/info.php
     223# for mapserver support