php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch patch-opcache-use-iis-pool-name for opcache Bug #72645Patch version 2017-08-28 07:40 UTC Return to Bug #72645 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: snt.kamikaze@yahoo.com--- ext/opcache/shared_alloc_win32.c Wed Jul 13 08:57:00 2016 +++ ext/opcache/shared_alloc_win32.c Fri Jul 22 01:32:58 2016 @@ -79,9 +79,12 @@ static char newname[MAXPATHLEN + UNLEN + 4]; char uname[UNLEN + 1]; DWORD unsize = UNLEN; + char* pool_id; GetUserName(uname, &unsize); - snprintf(newname, sizeof(newname) - 1, "%s@%s", name, uname); + + pool_id = getenv("APP_POOL_ID"); + snprintf(newname, sizeof(newname) - 1, "%s@%s%s%s", name, uname, pool_id != NULL ? "@" : "", pool_id != NULL ? pool_id : ""); return newname; } @@ -91,11 +94,14 @@ char uname[UNLEN + 1]; DWORD unsize = UNLEN; int l; + char* pool_id; GetTempPath(MAXPATHLEN, windir); GetUserName(uname, &unsize); l = strlen(windir); - snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname); + + pool_id = getenv("APP_POOL_ID"); + snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s%s%s", ACCEL_FILEMAP_BASE, uname, pool_id != NULL ? "@" : "", pool_id != NULL ? pool_id : ""); return windir; } |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sun Dec 22 01:01:30 2024 UTC |