Compare commits

...
18 Commits
Author SHA1 Message Date
Remi Collet 0b8cd4bd96 Update versions for PHP 7.2.20 2019-07-02 09:08:27 +00:00
Remi Collet 7fabfb1a9a Update NEWS for PHP 7.2.20 2019-07-02 09:08:27 +00:00
Remi Collet e8b41bb7e4 prepare NEWS for GA 2019-07-02 11:06:03 +02:00
Remi Collet 76b2e5d16d fix test for Windows and for parallel run
(cherry picked from commit d8202bf917)
2019-06-20 14:20:46 +02:00
Remi Collet c12dc24699 improve test clean section
(cherry picked from commit b3cfeda3c7)
2019-06-20 14:20:38 +02:00
Remi Collet e3ee3135fd add NEWS entry 2019-06-20 10:39:32 +02:00
Remi Collet a28383c927 add test for #78185
(cherry picked from commit 63f2d88088)
2019-06-20 10:38:26 +02:00
Dmitry Stogov d51108d5df Fixed bug #78185 (File cache no longer works)
(cherry picked from commit cd6a6e4cf2)
2019-06-20 10:38:15 +02:00
Remi Collet 9fbab56896 Update NEWS for 7.2.20 2019-06-18 07:25:17 +00:00
Remi Collet ad262c9c99 Update NEWS for PHP 7.2.20RC2 2019-06-18 07:08:21 +00:00
Remi Collet a05fed038b add NEWS entry for RC2 2019-06-18 09:03:30 +02:00
Dmitry Stogov 99dde02e11 Backport 96a12578c1
(cherry picked from commit 28808ca96d)
2019-06-18 07:48:59 +02:00
Dmitry Stogov 6c225a6318 Backport 91a6cdbff5
(cherry picked from commit 40f463b560)
2019-06-18 07:48:49 +02:00
Nikita Popov 42c7d5106b Fixed bug #78106
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).

(cherry picked from commit f1a8138055)
2019-06-18 07:48:37 +02:00
Nikita Popov f6c93431b3 Add test for bug #78106
Also add PHP_TEST_EXTRA_ARGS environment variable, which allows
to pass on -c, -d etc flags provided by run-tests.php. Otherwise
we won't get the built-in server to run with opcache.

(cherry picked from commit f8a68fd935)
2019-06-18 07:48:22 +02:00
Remi Collet 940c43019c Update NEWS for 7.2.20 2019-06-11 10:01:35 +00:00
Remi Collet 8f7fa350a7 Update CREDITS for PHP 7.2.20RC1 2019-06-11 09:44:24 +00:00
Remi Collet 8d5f8e13af Update NEWS for PHP 7.2.20RC1 2019-06-11 09:44:24 +00:00
13 changed files with 126 additions and 22 deletions

No files matched your search

+6 -1
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2019, PHP 7.2.20
04 Jul 2019, PHP 7.2.20
- Core:
. Fixed bug #76980 (Interface gets skipped if autoloader throws an exception).
@@ -16,6 +16,11 @@ PHP NEWS
. Fixed bug #38546 (bindParam incorrect processing of bool types).
(camporter)
- Opcache:
. Fixed bug #78106 (Path resolution fails if opcache disabled during request).
(Nikita)
. Fixed bug #78185 (File cache no longer works). (Dmitry)
- OpenSSL:
. Fixed bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c).
(Jakub Zelenka)
+1 -1
View File
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=20
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+31 -6
View File
@@ -413,7 +413,7 @@ static zend_string *accel_find_interned_string(zend_string *str)
if (!ZCG(counted)) {
if (!ZCG(accelerator_enabled) || accel_activate_add() == FAILURE) {
return str;
return NULL;
}
ZCG(counted) = 1;
}
@@ -658,10 +658,9 @@ static void accel_use_shm_interned_strings(void)
if (ZCSG(interned_strings_saved_top) == NULL) {
accel_copy_permanent_strings(accel_new_interned_string);
} else {
ZCG(counted) = 1;
accel_copy_permanent_strings(accel_replace_string_by_shm_permanent);
if (ZCG(counted)) {
accel_deactivate_sub();
}
ZCG(counted) = 0;
}
accel_interned_strings_save_state();
@@ -1093,7 +1092,11 @@ char *accel_make_persistent_key(const char *path, int path_length, int *key_len)
cwd_len = ZCG(cwd_key_len) = buf + sizeof(buf) - 1 - res;
cwd = ZCG(cwd_key);
memcpy(ZCG(cwd_key), res, cwd_len + 1);
} else {
return NULL;
}
} else {
return NULL;
}
}
}
@@ -1132,7 +1135,11 @@ char *accel_make_persistent_key(const char *path, int path_length, int *key_len)
include_path_len = ZCG(include_path_key_len) = buf + sizeof(buf) - 1 - res;
include_path = ZCG(include_path_key);
memcpy(ZCG(include_path_key), res, include_path_len + 1);
} else {
return NULL;
}
} else {
return NULL;
}
}
}
@@ -1761,11 +1768,22 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
int key_length;
int from_shared_memory; /* if the script we've got is stored in SHM */
if (!file_handle->filename || !ZCG(enabled) || !accel_startup_ok) {
if (!file_handle->filename || !ZCG(accelerator_enabled)) {
/* The Accelerator is disabled, act as if without the Accelerator */
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
#ifdef HAVE_OPCACHE_FILE_CACHE
if (file_handle->filename
&& ZCG(accel_directives).file_cache
&& ZCG(enabled) && accel_startup_ok) {
return file_cache_compile_file(file_handle, type);
}
#endif
return accelerator_orig_compile_file(file_handle, type);
#ifdef HAVE_OPCACHE_FILE_CACHE
} else if (file_cache_only) {
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
return file_cache_compile_file(file_handle, type);
#endif
} else if (!ZCG(accelerator_enabled) ||
@@ -1775,6 +1793,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
return file_cache_compile_file(file_handle, type);
}
#endif
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
return accelerator_orig_compile_file(file_handle, type);
}
@@ -1801,10 +1821,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
/* try to find cached script by key */
key = accel_make_persistent_key(file_handle->filename, strlen(file_handle->filename), &key_length);
if (!key) {
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
return accelerator_orig_compile_file(file_handle, type);
}
persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length);
} else if (UNEXPECTED(is_stream_path(file_handle->filename) && !is_cacheable_stream_path(file_handle->filename))) {
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
return accelerator_orig_compile_file(file_handle, type);
}
@@ -2169,6 +2193,7 @@ static void accel_reset_pcre_cache(void)
static void accel_activate(void)
{
if (!ZCG(enabled) || !accel_startup_ok) {
ZCG(accelerator_enabled) = 0;
return;
}
@@ -2196,6 +2221,7 @@ static void accel_activate(void)
#ifdef HAVE_OPCACHE_FILE_CACHE
if (file_cache_only) {
ZCG(accelerator_enabled) = 0;
return;
}
#endif
@@ -2214,7 +2240,6 @@ static void accel_activate(void)
zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
zend_string_release(key);
zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode");
ZCG(accelerator_enabled) = 0;
return;
}
}
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #78106: Path resolution fails if opcache disabled during request
--FILE--
<?php
include __DIR__ . "/php_cli_server.inc";
php_cli_server_start(getenv('TEST_PHP_EXTRA_ARGS'));
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test2.php" );
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
?>
--EXPECT--
included
done
included
done
included
done
+3
View File
@@ -0,0 +1,3 @@
<?php
echo "included\n";
+6
View File
@@ -0,0 +1,6 @@
<?php
ini_set('opcache.enable', 0);
require_once 'bug78106_include.inc';
echo "done\n";
+5
View File
@@ -0,0 +1,5 @@
<?php
require_once 'bug78106_include.inc';
echo "done\n";
+37
View File
@@ -0,0 +1,37 @@
--TEST--
Bug #78185: file cache only no longer works
--INI--
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.file_cache={PWD}
opcache.file_cache_only=1
--FILE--
<?php
if (substr(PHP_OS, 0, 3) !== 'WIN') {
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
} else {
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
}
foreach (glob($pattern) as $p) {
var_dump($p);
}
?>
--CLEAN--
<?php
if (substr(PHP_OS, 0, 3) !== 'WIN') {
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
} else {
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
}
foreach (glob($pattern) as $p) {
unlink($p);
$p = dirname($p);
while(strlen($p) > strlen(__DIR__)) {
rmdir($p);
$p = dirname($p);
}
}
?>
--EXPECTF--
string(%d) "%s78185.php.bin"
+1
View File
@@ -240,6 +240,7 @@ static ZEND_INI_MH(OnEnable)
return FAILURE;
} else {
*p = 0;
ZCG(accelerator_enabled) = 0;
return SUCCESS;
}
}
+6 -6
View File
@@ -1,11 +1,11 @@
/*
/*
DO NOT EDIT THIS FILE!
it has been automaticaly created by php7/scripts/credits from
it has been automaticaly created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
if you want to change an entry you have to edit the appropriate
php7/sapi/.../CREDITS files
if you want to change an entry you have to edit the appropriate
CREDITS file instead
*/
@@ -28,7 +28,7 @@ CREDIT_LINE("FTP", "Stefan Esser, Andrew Skalski");
CREDIT_LINE("GD imaging", "Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger");
CREDIT_LINE("GetText", "Alex Plotnick");
CREDIT_LINE("GNU GMP support", "Stanislav Malyshev");
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi ");
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi");
CREDIT_LINE("IMAP", "Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky");
CREDIT_LINE("Input Filter", "Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky");
CREDIT_LINE("InterBase", "Jouni Ahto, Andrew Avdeev, Ard Biesheuvel");
+5 -5
View File
@@ -1,11 +1,11 @@
/*
/*
DO NOT EDIT THIS FILE!
it has been automaticaly created by php7/scripts/credits from
it has been automaticaly created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
if you want to change an entry you have to edit the appropriate
php7/sapi/.../CREDITS files
if you want to change an entry you have to edit the appropriate
CREDITS file instead
*/
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 20
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.2.20-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.2.20"
#define PHP_VERSION_ID 70220
+3 -1
View File
@@ -820,7 +820,7 @@ HELP;
if (substr(PHP_OS, 0, 3) == "WIN") {
$pass_options .= " -c " . escapeshellarg($conf_passed);
} else {
$pass_options .= " -c '$conf_passed'";
$pass_options .= " -c '" . realpath($conf_passed) . "'";
}
}
@@ -1611,6 +1611,8 @@ TEST $file
settings2params($ini_settings);
$env['TEST_PHP_EXTRA_ARGS'] = $pass_options . ' ' . $ini_settings;
// Check if test should be skipped.
$info = '';
$warn = false;