Opened 15 years ago

Closed 13 years ago

#3041 closed defect (fixed)

ms_iogetstdoutbufferbytes always returning 0 bytes written

Reported by: keithmoss Owned by: mapserverbugs
Priority: normal Milestone: 6.0 release
Component: MapScript-PHP Version: 6.0
Severity: normal Keywords: mapscript php ms_iogetstdoutbufferbytes
Cc:

Description

The documentation http://mapserver.org/mapscript/php/index.html#functions states that the ms_iogetstdoutbufferbytes() function returns the number of bytes written but it always return 0 in my tests.

Environment: Windows Server 2003, IIS6, PHP (via FastCGI) 5.2.9-2, MapServer 5.4.0-rc2 from MS4W.

PHP MapScript Version string: ($Revision: 8814 $ $Date: 2009-03-19 18:18:36 -0400 (Thu, 19 Mar 2009) $)

Attachments (2)

bufferbytes_test.php (389 bytes ) - added by keithmoss 15 years ago.
Simple test reproducing the bug.
bufferbytes_test.map (351 bytes ) - added by keithmoss 15 years ago.

Download all attachments as: .zip

Change History (9)

by keithmoss, 15 years ago

Attachment: bufferbytes_test.php added

Simple test reproducing the bug.

by keithmoss, 15 years ago

Attachment: bufferbytes_test.map added

comment:1 by aboudreault, 14 years ago

Resolution: fixed
Status: newclosed

Fixed and committed in r10193.

comment:2 by iap, 13 years ago

I have the same issue with PHP MapScript version 5.6.6 (Ubuntu 10.04, UbuntuGIS stable repository).

Test case:

ms_ioinstallstdouttobuffer();
$map->owsdispatch($this->_request);
$contentType = ms_iostripstdoutbuffercontenttype();
//header("Content-type: $contentType");
$size = ms_iogetStdoutBufferBytes();
ms_ioresethandlers();

//$size value is '0'

comment:3 by dmorissette, 13 years ago

The fix was made in the 6.0 trunk. It was not committed to the 5.6 branch. I'd suggest you try the latest 6.0 beta.

comment:4 by dmorissette, 13 years ago

Milestone: 6.0 release

comment:5 by iap, 13 years ago

Any chance getting this fix in next 5.* release ?

comment:6 by iap, 13 years ago

Resolution: fixed
Status: closedreopened
Version: 5.46.0

New test results: In 5.6 (Ubuntu 10.04, UbuntuGIS stable repository): $size = $image->saveimage(); WORKS $size = ms_iogetStdoutBufferBytes(); DOES NOT WORK

In 6.0 (Ubuntu 10.04, UbuntuGIS unstable repository): $size = $image->saveimage(); DOES NOT WORK $size = ms_iogetStdoutBufferBytes(); WORKS

comment:7 by aboudreault, 13 years ago

Resolution: fixed
Status: reopenedclosed

Backported in r11824. Haven't tested the saveimage() note... if it's an issue, please fill a new ticket.

Note: See TracTickets for help on using tickets.