[Mapserver-users] Linux RedHat 9.0 php/mapscript installation
Perry, James
jamesp at eastcan.ca
Fri Aug 15 05:40:04 PDT 2003
This is a multi-part message in MIME format.
--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
charset="iso-8859-1"
I think it's a PHP or Apache bug. PHP is looking at SCRIPT_FILENAME as the
program to run, while Apache is settign SCRIPT_FILENAME to the path of the
php binary (/var/www/cgi-bin/php), while PATH_TRANSLATED is the location of
the actual script.
I'm not sure which behaviour is correct, or how to get them to look in the
same place, but a simple workaround is to build a wrapper around PHP to
copy the PATH_TRANSLATED environment (CGI) variable into SCRIPT_FILENAME.
/var/www/cgi-bin/php:
#!/bin/bash
export SCRIPT_FILENAME=$PATH_TRANSLATED
exec /usr/local/bin/php
Using shell scripts for CGI isn't particularly safe, although that one is
simple enough that I don't think it'd be a problem... No guarantees though.
James
-----Original Message-----
From: Alexander Shostko [mailto:shostko at ureach.com]
Sent: Friday, August 15, 2003 3:02 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Linux RedHat 9.0 php/mapscript installation
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
--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
name="InterScan_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="InterScan_Disclaimer.txt"
*******************************************************************************************
This e-mail and any files transmitted with it are provided for convenience only
and is to be considered confidential and are intended solely for the use
of the individual to whom it is addressed. If you have received this e-mail
in error please notify the sender immediately.
CBCL Limited assumes no responsibility for data supplied electronically by e-mail
and any unauthorized use or changes to such data is strictly prohibited. CBCL
Limited maintains all rights and copyrights to e-mailed electronic files.
This message has been scanned for the presence of computer viruses, however
no warranty is given that this messge upon it's receipt is virus free and no liability
is accepted by the sender in this respect.
--------------InterScan_NT_MIME_Boundary--
More information about the MapServer-users
mailing list