Install/Config Problems
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Thu Apr 7 19:02:22 PDT 2005
Jeffrey,
In debian, and probably other systems it is possible to build a separate
version of mapserver and php that are outside the standard distributions
and then use then specifically in directories that are doing mapscript
and all the standard php stuff runs from the other directories.
Here is how I did it for using 4.0.1
# required by gd-2
sudo apt-get install libpng3 libpng3-dev
sudo apt-get install libjpeg62 libjpeg62-dev
# required by php4
sudo apt-get install libmysqlclient10-dev
# required by owt
sudo apt-get install libttf-dev libttf2
# For curl-7.11.0.tar.gz
(
cd curl-7.11.0
echo '--------------------- curl-7.11.0 ------------------------'
./configure --prefix=/opt/mapserver/
make
sudo make install
)
sleep 5
# For freetype-2.1.5.tar.gz
(
cd freetype-2.1.5
echo '-------------------- freetype-2.1.5 ----------------------'
./configure --prefix=/opt/mapserver/
make
sudo make install
)
sleep 5
# For gd-2.0.21.tar.gz
(
cd gd-2.0.21
echo '---------------------- gd-2.0.21 --------------------------'
./configure --prefix=/opt/mapserver/ --with-freetype=/opt/mapserver/
make
sudo make install
)
sleep 5
# For gdal-1.1.9.tar.gz
(
cd gdal-1.1.9
echo '--------------------- gdal-1.1.9 --------------------------'
./configure --prefix=/opt/mapserver/ --with-ogr --without-gif
make
sudo make install
)
sleep 5
# For proj-4.4.7.tar.gz
(
cd proj-4.4.7
echo '--------------------- proj-4.4.7 --------------------------'
./configure --prefix=/opt/mapserver/
make
sudo make install
)
sleep 5
# For expat-1.95.7.tar.gz
(
cd expat-1.95.7
echo '-------------------- expat-1.95.7 -------------------------'
./configure --prefix=/opt/mapserver/
make
sudo make install
)
sleep 5
# For php-4.3.4.tar.gz
(
cd mapserver-4.0.1
./configure \
--with-httpd=/usr/sbin/apache \
--with-proj=/opt/mapserver \
--with-wmsclient \
--with-gd=/opt/mapserver \
--with-freetype=/opt/mapserver \
--with-gdal \
--with-ogr=/opt/mapserver/bin/gdal-config \
--with-php=../php-4.3.4 \
--without-tiff \
--enable-runpath \
--without-xpm \
--with-curl-config=/opt/mapserver/bin/curl-config
make
sudo mkdir /opt/mapserver/cgi-bin
sudo cp mapserv scalebar legend /opt/mapserver/cgi-bin/
sudo cp mapscript/php3/php_mapscript.so /opt/mapserver/php4/extensions/
)
After this you need config apache with a <Directory ..>
block that uses the /opt/mapserver/cgi-bin/php version you built above
for any php scripts and then keep all you php/mapscript scripts in this
directory tree. Any php scripts out side the directory tree will use
system version of php whatever that is.
Hope this helps,
-Steve W.
Jeffrey Johnson wrote:
> Hello,
>
> I am attempting to install and configure
> mapserver+phpmapscript+chameleon on my debian/linux box and have run
> into a currently insurmountable issue. apache+php config is fine.
> Haven't really tested php extensively, but some simple tests work ok.
> I have configured Mapserver with the following command.
>
> ./configure --with-proj --with-ogr --with-gdal --with-jpeg --with-png
> --with-tiff --with-postgis --with-wfs --with-wcs --with-wms
> --with-wfsclient --with-wmsclient --with-php=/usr/src/php-4.3.10/
>
> then ran make and copied the 'mapserv' executable into the cgi-bin
> directory. When attempting to access a mapfile using the cgi-script
> directly http://domainname.com/cgi-bin/mapserv?map=/home/www/map1.map&mode=map
> I am returned '500 Internal Server error'. The logfile contains
> 'Premature end of script headers: /usr/local/apache/cgi-bin/mapserv'
>
> If I re-run configure and remove the --with-php=/usr/src/php-4.3.10/
> directive and recompile, the map displays fine.
>
> I had originally compiled PHP as a DSO, but couldnt get mapserver to
> work this way either, so reverted to compiling php into apache
> directly.
>
> Any ideas?
>
> Thanks in advance,
>
> Jeff
>
More information about the MapServer-users
mailing list