[Mapserver-users] Premature end of script headers: php

Richard Ryda rryda at mgedata.cz
Tue Mar 2 09:04:30 EST 2004


I am trying to compile Mapscript 4.0.1 on Red Hat 7.3. Here is my compile
script:

cd /usr/src/mapserver-4.0.1
rm -f config.cache
make clean
./configure \
--without-tiff \
--without-eppl \
--without-pdf \
--without-ming \
--without-wmsclient \
--without-wfs \
--without-wfsclient \
--without-proj \
--with-threads \
--with-gdal=/usr/local/bin/gdal-config \
--with-ogr \
--with-gd=/usr \
--with-png=/usr/local \
--with-php=/usr/src/php-4.3.4 \
--enable-runpath
make

My PHP script crashes at this code:
$ms_omap = ms_newmapobj($ms_mapfile);
$ms_layers_count = $ms_omap -> numlayers;
for ($i = 0; $i < $ms_layers_count; $i++) {
    $ms_layer = $ms_omap -> getlayer($i);
......
}

It crashes when $i = 1. $i = 0 returns the first layer succesfully.
Apache returns Internal Server Error 500 with the following message in the
log:
"Premature end of script headers: php"


Thanks for any idea.
Richard




More information about the mapserver-users mailing list