Skip to content

Commit 4aec8bc

Browse files
committed
Merge branch 'PHP-7.0'
* PHP-7.0: update NEWS Fixed bug #71024 Unable to use PHP 7.0 x64 side-by-side with PHP 5.6 x32 on the same server
2 parents fd46184 + 920c088 commit 4aec8bc

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,8 +2459,6 @@ static void accel_globals_dtor(zend_accel_globals *accel_globals)
24592459
}
24602460
}
24612461

2462-
#ifdef HAVE_OPCACHE_FILE_CACHE
2463-
24642462
#define ZEND_BIN_ID "BIN_" ZEND_TOSTR(SIZEOF_CHAR) ZEND_TOSTR(SIZEOF_INT) ZEND_TOSTR(SIZEOF_LONG) ZEND_TOSTR(SIZEOF_SIZE_T) ZEND_TOSTR(SIZEOF_ZEND_LONG) ZEND_TOSTR(ZEND_MM_ALIGNMENT)
24652463

24662464
static void accel_gen_system_id(void)
@@ -2489,7 +2487,6 @@ static void accel_gen_system_id(void)
24892487
md5str[(i * 2) + 1] = c;
24902488
}
24912489
}
2492-
#endif
24932490

24942491
#ifdef HAVE_HUGE_CODE_PAGES
24952492
# ifndef _WIN32
@@ -2619,9 +2616,7 @@ static int accel_startup(zend_extension *extension)
26192616
return FAILURE;
26202617
}
26212618

2622-
#ifdef HAVE_OPCACHE_FILE_CACHE
26232619
accel_gen_system_id();
2624-
#endif
26252620

26262621
#ifdef HAVE_HUGE_CODE_PAGES
26272622
if (ZCG(accel_directives).huge_code_pages &&

ext/opcache/ZendAccelerator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ typedef struct _zend_accel_globals {
228228
int auto_globals_mask;
229229
time_t request_time;
230230
time_t last_restart_time; /* used to synchronize SHM and in-process caches */
231-
#ifdef HAVE_OPCACHE_FILE_CACHE
232231
char system_id[32];
233-
#endif
234232
HashTable xlat_table;
235233
/* preallocated shared-memory block to save current script */
236234
void *mem;

ext/opcache/shared_alloc_win32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,26 @@ static void zend_win_error_message(int type, char *msg, int err)
7676

7777
static char *create_name_with_username(char *name)
7878
{
79-
static char newname[MAXPATHLEN + UNLEN + 4];
79+
static char newname[MAXPATHLEN + UNLEN + 4 + 1 + 32];
8080
char uname[UNLEN + 1];
8181
DWORD unsize = UNLEN;
8282

8383
GetUserName(uname, &unsize);
84-
snprintf(newname, sizeof(newname) - 1, "%s@%s", name, uname);
84+
snprintf(newname, sizeof(newname) - 1, "%s@%s@%.32s", name, uname, ZCG(system_id));
8585
return newname;
8686
}
8787

8888
static char *get_mmap_base_file(void)
8989
{
90-
static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@")];
90+
static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@") + 1 + 32];
9191
char uname[UNLEN + 1];
9292
DWORD unsize = UNLEN;
9393
int l;
9494

9595
GetTempPath(MAXPATHLEN, windir);
9696
GetUserName(uname, &unsize);
9797
l = strlen(windir);
98-
snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname);
98+
snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
9999
return windir;
100100
}
101101

0 commit comments

Comments
 (0)