PHP Mapscript and WMS Server
Bart van den Eijnden (OSGIS)
bartvde at XS4ALL.NL
Mon Sep 4 11:59:05 PDT 2006
You can set the content-type, by using something like:
header("Content-type: image/gif");
Frank, you can also try to run php with the -q switch from the
command-line to get rid of:
Content-type: text/html
X-Powered-By: PHP/4.3.8
Best regards,
Bart
Frank Warmerdam schreef:
> Nicol Hermann wrote:
>> Frank,
>>
>> thank you very much for your mail.
>> I'm afraid there is still a problem somewhere.
>> I checked out the latest cvs release and rerun my test script but the
>> "bad lines" at the end are still present. PHP mapscript version is:
>> $Id: php_mapscript.c,v 1.259 2006/08/31 15:34:30 assefa Exp $
>> Is there's something i could do to further debug this issues?
>>
>> Maybe an other issue.
>> I put together a simple wms server map-file which includes an other wms
>> (demis). When i execute my PHP script with
>> http://localhost/~nicol/mapserver/dev/wxsGetMapCascading.php?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=Countries&WIDTH=200&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=5.86629,47.2736,15.0486,55.0583
>>
>> the Content-type won't be set correct.
>
> Nicole,
>
> I stand corrected. The problem you are seeing is different than what I
> thought was going on. When I run your php script at the unix commandline
> I get the following back:
>
> Content-type: text/html
> X-Powered-By: PHP/4.3.8
>
> ttt9Content-type: image/png
>
> ?PNG
> ...
>
> So the problem seems to be that PHP always emits the text/html content
> type. I don't know how to alter this in PHP, or even if it is possible.
> But the problem is related to PHP document processing, not mapserver or
> PHP Mapscript itself.
>
> Best regards,
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
More information about the MapServer-users
mailing list