Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP_MAPSCRIPT - shapefileObj->free() does not close file #40

Closed
mapserver-bot opened this issue Apr 3, 2012 · 1 comment
Closed

PHP_MAPSCRIPT - shapefileObj->free() does not close file #40

mapserver-bot opened this issue Apr 3, 2012 · 1 comment
Assignees

Comments

@mapserver-bot
Copy link

Reporter: dmorissette
Date: 2001/08/30 - 16:50
Trac URL: http://trac.osgeo.org/mapserver/ticket/40

With PHP 4.0.6, a call to shpfile->free() does not close the file immediately, 
and this has the side-effect that a script that creates a temporary shapefile 
cannot reuse it until the next script execution.

This can be reproduced using test_writeshape.phtml, after adding error_log() 
messages in the PHP script, and a msDebug() call in mapscript_i.c: 
shapefileObj_destroy()

Note: doing 2 calls in a row to shapefile->free() will actually close the 
file... so this is definitely related to the reference counts that were added 
internally in PHP4.
@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2001/09/13 - 22:53

Fixed at the same time as bug#30 ... was related to invalid handling of 
reference counts: the shapefileObj objects started with a refcount of 2.  This 
was caused by unnecessary add_ref calls that were added to avoid invalid 
_handle_ errors.  

See bug#30 for the full fix description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants