[mapserver-users] PHP Mapscript $layerObj->set("data", $dataString) doesn't work with long Strings (2036 characters)
Michael Härtel
haerta at yahoo.com
Mon Aug 18 07:56:00 PDT 2008
Hello Daniel and List
I changed the mapfile and defined a layer with a "DATA" string which consists of 2036 characters. That works fine but as soon as I change it to 2037 characters I get the "Server Error 500": premature End of script headers again.
So it doesn't make a difference whether I set it with mapscript or define it directly.
regards,
Michael
--- On Thu, 8/14/08, Daniel Morissette <dmorissette at mapgears.com> wrote:
> From: Daniel Morissette <dmorissette at mapgears.com>
> Subject: Re: [mapserver-users] PHP Mapscript $layerObj->set("data", $dataString) doesn't work with long Strings (2036 characters)
> To: haerta at yahoo.com
> Cc: mapserver-users at lists.osgeo.org
> Date: Thursday, August 14, 2008, 4:14 PM
> Michael,
>
> Can you please try setting the same DATA line directly in
> the mapfile
> instead of via $layerObj->set() and confirm that you get
> the same error?
>
> The $layerObj->set() method uses a dynamic buffer
> allocation, so there
> is no reason for it to bail on buffers larger than a
> specific size. I
> suspect the problem may be in MapServer's Oracle
> Spatial driver code
> that may be using a static buffer to build the SQL
> statement.
>
> I see that there is already ticket #2694 that seems to be
> about the same
> thing: http://trac.osgeo.org/mapserver/ticket/2694
>
> Daniel
>
> Michael Härtel wrote:
> > Dear List!
> >
> > It seems that I found a bug concerning PHP Mapscript
> or MapScript in general. The result is a "Premature end
> of script headers: php-cgi.exe" and a "Internal
> Server error 500"
> >
> > In our web application I dynamically change the
> "DATA" attribute of one layer to retrieve the
> correct objects out of the Oracle 10g database. This works
> great as long the data String is not longer than 2036
> characters.
> >
> > In php I set the DATA string with
> "$layerObj->set("data" ,
> $dataString);". A var_dump($dataString) shows that it
> is 2037 characters long. But debugging at the database side
> showed that only 1524 characters are included in the select
> statement. So a total of 513 (Not 512?) characters are cut
> off. A $dataString containing 2036 characters work fine.
> >
> > Because the DATA string is only a part of the total
> SQL string that is submitted to the database (when
> navigating a map, a " WHERE SDO_FILTER" clause is
> added) the total SQL string for retrieving the objects (that
> are burnt into the WMS GETMAP image) gets about 2215
> characters long which works fine with sqlplus.
> >
> > It seems that the
> "$layerObj->set("data" ,
> $dataString);" line doesn't work for strings longer
> than 2036 characters.
> >
> > Can someone confirm this?
> >
> > Thanks for any reply,
> >
> > Michael
> > ---
> > I use "ms4w_2.2.7" zip that includes
> mapserver 5.0.2. The mapscript.dll 225.280 bytes and is from
> february, 5th 2008
> >
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> >
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
More information about the MapServer-users
mailing list