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

Benjamin Wragg bwragg at tpg.com.au
Tue Aug 19 15:37:35 PDT 2003


Are you still having trouble Alexander? I had a similar problem a while
back. I narrowed it down to a problem in the php compile. If I used the
--enable-discard-path in my ./configure line for PHP I would get errors
like you:

         **Warning: Unexpected character in input: '' (ASCII=24) state=1
in 
         **/var/www/cgi-bin/php on line 686


         ***Warning: Unexpected character in input: '' (ASCII=8) state=1
in 
         ***/var/www/cgi-bin/php on line 686
         ***...
         ***Parse error: parse error in /usr/local/apache/cgi-bin/php

I can't find the page now, but there is a discussion on the zend site
about this and as a work around the user found that compiling PHP
without the --enable-discard-path option seemed to solve the problem.
Please be aware though that the documentation for php says the following
regarding this option:

         --enable-discard-path   If this is enabled, the PHP CGI binary
can safely be placed outside of the web tree and people 
         will not be able to circumvent .htaccess security."

Hope it helps.

Cheers,

Benjamin Wragg

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of
woodbri at swoodbridge.com
Sent: Friday, 15 August 2003 9:32 PM
To: mapserver-users at lists.gis.umn.edu; shostko at ureach.com
Subject: Re: [Mapserver-users] Linux RedHat 9.0 php/mapscript
installation


I think php 4.3.2 is broken for CGI. I have had a similar problem on 
RH 8.0 on solved it by using PHP-4.3.1

-Steve W.

On 15 Aug 2003 at 2:02, 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
> 


_______________________________________________
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