Bug 1322 Comments

John Novak jnovak at NOVACELL.COM
Tue Aug 15 01:04:08 EDT 2006

I apologize for sending this to the dev list.  I have signed up for a 
Bugzilla account and am waiting for confirmation to allow updates to the 
bug description.

I'm including the changes I'm trying to add to the comments for 1322, as 
I do not want to lose them:

I've made a temporary change to my php_mapscript.c to address this issue.

I've added calls to getpid and gettimeofday to php3_ms_img_saveWebImage.

int iPID = getpid();
gettimeofday( &stTimeVal, NULL );

I have also changed the sprintf calls as follows:

sprintf( pBuf, "%s%04x%08x%08x%04d.%s", ", pImagepath, iPID, 
stTimeVal.tv_sec, stTimeVal.tv_usec, nTmpCount, pszImageExt );


sprintf( pBuf, "%s%04x%08x%08x%04d.%s", pImageurl, iPID, 
stTimeVal.tv_sec, stTimeVal.tv_usec, nTmpCount, pszImageExt );

I went with hex file names as this is a more compact representation and 
the files don't really need to be human readable.

This is working for me on a 64 bit Fedora Core build.  The gettimeofday 
call should probably be replaced with a slightly reworked version of the 
call supplied by maptime.c, which seems to be set up for all platforms, 
but not for storing microseconds.

Best Regards,

John Novak

More information about the mapserver-dev mailing list