php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #72645
Patch patch-opcache-use-iis-pool-name revision 2017-08-28 07:40 UTC by snt dot kamikaze at yahoo dot com
revision 2016-07-22 07:48 UTC by pvasilevich at plesk dot com

Patch patch-opcache-use-iis-pool-name for opcache Bug #72645

Patch version 2016-07-22 07:48 UTC

Return to Bug #72645 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: pvasilevich@plesk.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;
 }
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 07:01:30 2024 UTC