[Mapserver-users] Linux RedHat 9.0 php/mapscript installation

Dylan Keon keon at nacse.org
Fri Aug 15 03:08:49 EDT 2003


Alexander,

Did you copy /usr/local/php-4.3.2/sapi/cgi/php to your cgi-bin?  Or did 
you copy another php file to your cgi-bin?  Also make sure the php 
executable that came with RH9 isn't being called for some reason.

Do you have lines similar to these in your httpd.conf?...

     AddType application/x-httpd-php .php .phtml
     Action application/x-httpd-php /cgi-bin/php

You might also try removing certain PHP ./configure options one by one, 
to see if you can pinpoint the problem.

I'm not familiar with --with-layout=RedHat (in your Apache config). 
Make sure that's not doing anything weird. :-)

HTH,
--Dylan


Alexander Shostko wrote:

> Dear List !
>                                                                 
>                
> The brief description of the problem:
>                                                                 
>                
> I am porting php/mapscript application
> (php-4.3.2/apache-1.3.27)
> from Windows to Linux
>                                                                 
>                
> Linux is Red-Hat 9.0, php is 4.3.2, apache is 1.3.28
> installed in /etc/httpd and /var/www/ as typical.
>                                                                 
>                
> mapserver-3.6.6
>                                                                 
>                
> The installation flags and options are below.  All compiles
> fine.  But does
> not run at all. It did not even come to
> mapscript. The php itself does not work with apache as cgi .
>                                                                 
>                
> When I try to run simple
>                                                                 
>                
> <?php
>   // nothing works
>   dl("php_mapscript.so");
>   phpinfo();
> ?>
> 
> gives
>                                                                 
>                
> --
>                                                                 
>                
> Warning: Unexpected character in input: '(ASCII=15) state=1 in
> /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> Warning: Unexpected character in input: '^B' (ASCII=2) state=1
> in /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> Warning: Unexpected character in input: ' in
> /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> Warning: Unexpected character in input: ' in
> /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> Warning: Unexpected character in input: '(ASCII=15) state=1 in
> /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> Parse error: parse error in /var/www/cgi-bin/php on line 3395
>                                                                 
>                
> --
> which means that php simply not working whether I use dl(..) or
> not.
>                                                                 
>                
> I tried also httpd-2.0.47 etc.  same results. ALso I tried from
> tarball
> (Linux 9.0 installation) of apache/php . Same results.
>                                                                 
>                
> The possible options are:
>                                                                 
>                
> --Install older / stabler RedHat (8.0 for ex, 9.0 is very new)
> --Install apache 1.3.27 or older
> --try php-4.3.0 or 4.2.x until I have at least apache-php as cgi
> working,
> then put mapscript there.
>                                                                 
>                
> Any ideas on which Linux/apache/php/options or simly what I am
> missing ?
>                                                                 
>                
> Thanks a lot
> Alex
> Simulation Tech.
> engineer
>                                                                 
>                
> ------------------------------------------
> 
> 
> The apache is compiled with:
>                                                                 
>                
> rm config.cache
> ./configure \
> --prefix=/etc/httpd/ \
> --enable-module=all \
> --enable-shared=max \
> --with-layout=RedHat \
> --disable-rule=WANTHSREGEX=no
>                                                                 
>                
> php is compiled with:
>                                                   
> rm config.cache
> ./configure \
>  --with-regex=system \
>  --with-config-file-path=/etc/httpd/ \
>  --enable-safe-mode \
>  --enable-force-cgi-redirect \
>  --enable-discard-path \
>  --enable-versioning \
>  --enable-magic-quotes \
>  --enable-track-vars \
>  --with-gd \
>  --with-zlib  \
>  --with-jpeg \
>  --with-ming \
>  --with-xml \
>  --with-ftp \
>  --with-regex=system
>                                                                 
>                
> when making make test it tells that:
> 
> =====================================================================
> CWD         : /usr/local/php-4.3.2
> PHP         : /usr/local/php-4.3.2/sapi/cli/php
> PHP_SAPI    : cli
> PHP_VERSION : 4.3.2
> ZEND_VERSION: 1.3.0
> PHP_OS      : Linux
> INI actual  : /etc/httpd/php.ini
> More .INIs  :
> Extra dirs  :
> =====================================================================
> TIME START 2003-08-15 01:47:20
>                                                                 
>                
> The mapscript is compiled with:
> rm -r config.cache
> ./configure \
>   --without-tiff \
>   --without-eepl \
>   --with-jpeg \
>   --with-threads \
>   --with-proj \
>   --with-gdal \
>   --with-php=../php-4.3.2 \
>   --with-gd=/usr/local \
>   --with-freetype=/usr/bin \
>   --with-pdf \
>   --with-ogr \
>   --with-ming \
>   --with-wmsclient \
>   --with-wfs \
>   --with-wfs-client
> 
> 
> 
>                               
> 
> 
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list