php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66461
Patch Opcache-isb.patch revision 2014-01-10 19:13 UTC by Terry at ellisons dot org dot uk
revision 2014-01-10 18:46 UTC by Terry at ellisons dot org dot uk

Patch Opcache-isb.patch for opcache Bug #66461

Patch version 2014-01-10 18:46 UTC

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

Obsoleted by patches:

Patch Revisions: 2014-01-10 19:13 UTC | 2014-01-10 18:46 UTC

Developer: Terry@ellisons.org.uk



  +	STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "4"  , PHP_INI_SYSTEM, OnUpdateInternedStringsBuffer,   accel_directives.interned_strings_buffer,   zend_accel_globals, accel_globals)
   #endif
   	STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "2000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles,	 accel_directives.max_accelerated_files,     zend_accel_globals, accel_globals)
   	STD_PHP_INI_ENTRY("opcache.max_wasted_percentage" , "5"   , PHP_INI_SYSTEM, OnUpdateMaxWastedPercentage,	 accel_directives.max_wasted_percentage,     zend_accel_globals, accel_globals)
 diff --git a/ZendAccelerator.c b/ZendAccelerator.c
 index b25e33c..4f90fd7 100644
 
  --- a/ZendAccelerator.c
  +++ b/ZendAccelerator.c
 @@ -2462,15 +2462,15 @@ static int zend_accel_init_shm(TSRMLS_D)
 @@ -2167,6 +2167,9 @@ static void accel_activate(void)
  		}
  	}
  
 +	/* The API is enabled by default if opcache.api_password == "" */
 +	ZCG(accel_directives).api_enabled = (!ZCG(accel_directives).api_password || !*ZCG(accel_directives).api_password);
 +
  	ZCG(cwd) = NULL;
  
  	SHM_PROTECT();
 @@ -2462,15 +2465,15 @@ static int zend_accel_init_shm(TSRMLS_D)
   #if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
   
   # ifndef ZTS
  -	zend_hash_init(&ZCSG(interned_strings), (ZCG(accel_directives).interned_strings_buffer * 1024 * 1024) / (sizeof(Bucket) + sizeof(Bucket*) + 8 /* average string length */), NULL, NULL, 1);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Nov 16 22:01:35 2019 UTC