Skip to content

Commit ce20287

Browse files
committed
Merge branch 'PHP-5.6' into PHP-5.6.0
* PHP-5.6: (271 commits) one heading is enough add new NEWS block for alpha3 XFAIL the leaking multibyte tests, we should really get to the bottom of this Fixed numbering in UPGRADING file Updated NEWS for fixed phpdbg issue php#85 Added stdion/stdout/stderr constsnts and their php:// wrappers Fixes issue php#85 add missing NEWS entry to the correct release where it was added 5.5.12 was released yesterday add missing NEWS entry to the correct release where it was added Updated NEWS entry for phpdbg add missing NEWS entry to the correct release where it was added add some missing NEWS entries fix test locality inconsitency BFN fix bug #64247 (CURLOPT_INFILE doesn't allow reset) Added further notice about removal of IS_CONSTANT_INDEX/ARRAY macros Fix bug #67060: use default mode of 660 separate travis jobs for debug and non-debug builds separate travis jobs for TS and NTS builds put this test back to XFAIL, as it was before, since it is still leaking memory ... Conflicts: NEWS
2 parents 11d102e + 0a73853 commit ce20287

File tree

246 files changed

+15456
-4957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+15456
-4957
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ sapi/fpm/php-fpm.1
246246
sapi/fpm/init.d.php-fpm
247247
sapi/fpm/php-fpm.conf
248248
sapi/fpm/fpm/php-cgi
249+
sapi/phpdbg/phpdbg_parser.c
250+
sapi/phpdbg/phpdbg_parser.h
249251
sapi/phpdbg/phpdbg
250252
scripts/php-config
251253
scripts/phpize

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ env:
1515
- PDO_MYSQL_TEST_USER=travis
1616
- PDO_MYSQL_TEST_PASS=
1717
- PDO_MYSQL_TEST_HOST=127.0.0.1
18-
matrix:
1918
- REPORT_EXIT_STATUS=1
19+
matrix:
20+
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
21+
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=0
22+
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=1
23+
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
2024

2125
before_script:
2226
# Compile PHP

NEWS

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,102 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
01 May 2014, PHP 5.6.0 Beta 2
4+
5+
- CLI server:
6+
. Fixed bug #67079 (Missing MIME types for XML/XSL files). (Anatol)
7+
8+
- COM:
9+
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
10+
11+
- Core:
12+
. Fixed bug #65701 (copy() doesn't work when destination filename is created
13+
by tempnam()). (Boro Sitnikovski)
14+
. Fixed bug #66015 (Unexpected array indexing in class's static property). (Bob)
15+
. Added (constant) string/array dereferencing to static scalar expressions
16+
to complete the set; now possible thanks to bug #66015 being fixed. (Bob)
17+
. Fixed bug #66568 (Update reflection information for unserialize() function).
18+
(Ferenc)
19+
. Fixed bug #66660 (Composer.phar install/update fails). (Ferenc)
20+
. Fixed bug #67024 (getimagesize should recognize BMP files with negative
21+
height). (Gabor Buella)
22+
. Fixed bug #67064 (Countable interface prevents using 2nd parameter
23+
($mode) of count() function). (Bob)
24+
. Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
25+
. Fixed bug #67033 (Remove reference to Windows 95). (Anatol)
26+
27+
- cURL:
28+
. Fixed bug #64247 (CURLOPT_INFILE doesn't allow reset). (Mike)
29+
. Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent).
30+
(Freek Lijten)
31+
32+
- Date:
33+
. Fixed bug #66721 (__wakeup of DateTime segfaults when invalid object data is
34+
supplied). (Boro Sitnikovski)
35+
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
36+
37+
- DOM:
38+
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
39+
not only the subset). (Anatol)
40+
41+
- Fileinfo:
42+
. Fixed bug #66907 (Solaris 10 is missing strcasestr and needs substitute).
43+
(Anatol)
44+
. Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
45+
46+
- FPM:
47+
. Fixed bug #66482 (unknown entry 'priority' in php-fpm.conf).
48+
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
49+
(Julio Pintos)
50+
. Fixed bug #67060 (sapi/fpm: possible privilege escalation due to insecure
51+
default configuration) (CVE-2014-0185). (Stas)
52+
53+
- GMP:
54+
. Fixed crashes in serialize/unserialize. (Stas)
55+
56+
- JSON:
57+
. Fixed bug #66021 (Blank line inside empty array/object when
58+
JSON_PRETTY_PRINT is set). (Kevin Israel)
59+
60+
- LDAP:
61+
. Fixed issue with null bytes in LDAP bindings. (Matthew Daley)
62+
63+
- litespeed
64+
. Fixed bug #63228 (-Werror=format-security error in lsapi code).
65+
(George Wang)
66+
67+
- mysqlnd:
68+
. Added a new fetching mode to mysqlnd. (Andrey)
69+
70+
- OpenSSL:
71+
. Fix bug #66942 (memory leak in openssl_seal()). (Chuan Ma)
72+
. Fix bug #66952 (memory leak in openssl_open()). (Chuan Ma)
73+
. Fix bug #66840 (Fix broken build when extension built separately).
74+
(Daniel Lowrey)
75+
76+
- phpdbg:
77+
. Added watchpoints (watch command). (Bob)
78+
. Renamed some commands (next => continue and how to step). (Joe)
79+
. Fixed issue #85 (https://github.com/krakjoe/phpdbg/issues/85). (Bob)
80+
81+
- PDO:
82+
. Fixed bug #66604 ('pdo/php_pdo_error.h' not copied to the include dir).
83+
(Matteo)
84+
85+
- PDO-ODBC:
86+
. Fixed bug #50444 (PDO-ODBC changes for 64-bit).
87+
88+
- Phar:
89+
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
90+
in its name). (PR #588)
91+
92+
- SQLite:
93+
. Fixed bug #66967 (Updated bundled libsqlite to 3.8.4.3). (Anatol)
94+
95+
- Apache2 Handler SAPI:
96+
. Fixed Apache log issue caused by APR's lack of support for %zu
97+
(APR issue https://issues.apache.org/bugzilla/show_bug.cgi?id=56120).
98+
(Jeff Trawick)
99+
3100
10 Apr 2014, PHP 5.6.0 Beta 1
4101

5102
- Core:
@@ -135,7 +232,6 @@ PHP NEWS
135232
. Fixed bug #53965 (<xsl:include> cannot find files with relative paths
136233
when loaded with "file://"). (Anatol)
137234

138-
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
139235
27 Feb 2014, PHP 5.6.0 Alpha 3
140236

141237
- Core

UPGRADING

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,37 @@ PHP 5.6 UPGRADE NOTES
44

55
1. Backward Incompatible Changes
66
2. New Features
7-
2. Changes in SAPI modules
8-
3. Deprecated Functionality
9-
4. Changed Functions
10-
5. New Functions
11-
6. New Classes and Interfaces
12-
7. Removed Extensions
13-
8. Other Changes to Extensions
14-
9. New Global Constants
15-
10. Changes to INI File Handling
16-
11. Other Changes
7+
3. Changes in SAPI modules
8+
4. Deprecated Functionality
9+
5. Changed Functions
10+
6. New Functions
11+
7. New Classes and Interfaces
12+
8. Removed Extensions
13+
9. Other Changes to Extensions
14+
10. New Global Constants
15+
11. Changes to INI File Handling
16+
12. Other Changes
1717

1818

1919
========================================
2020
1. Backward Incompatible Changes
2121
========================================
2222

23+
- Core:
24+
By fixing bug #66015 it is no longer possible to overwrite keys in static scalar
25+
arrays. Quick example to illustrate:
26+
class Test {
27+
const FIRST = 1;
28+
public $array = array(
29+
self::FIRST => 'first',
30+
'second',
31+
'third'
32+
);
33+
}
34+
Test::$array will have as expected three array keys (1, 2, 3) and no longer
35+
two (0, 1). self::FIRST will no longer overwrite 'third' having key 1 then,
36+
but will mark the beginning of indexing.
37+
2338
- JSON:
2439
json_decode() no longer accepts non-lowercase variants of lone JSON true,
2540
false or null values. For example, True or FALSE will now cause json_decode to
@@ -137,7 +152,7 @@ PHP 5.6 UPGRADE NOTES
137152
operations using the ext/pgsql extension.
138153

139154
========================================
140-
2. Changes in SAPI modules
155+
3. Changes in SAPI modules
141156
========================================
142157

143158
- Added phpdbg SAPI.
@@ -146,8 +161,12 @@ PHP 5.6 UPGRADE NOTES
146161
- Support for FPM workers changing the apparmor profile through the pool configuration.
147162
(https://wiki.php.net/rfc/fpm_change_hat)
148163

164+
- Support for several XML MIME types in the built-in CLI server. For static
165+
files with extensions .xml, .xsl, .xsd the Content-Type header
166+
application/xml is now sent automatically.
167+
149168
========================================
150-
3. Deprecated Functionality
169+
4. Deprecated Functionality
151170
========================================
152171

153172
- Incompatible context calls:
@@ -176,7 +195,7 @@ PHP 5.6 UPGRADE NOTES
176195
mbstring.internal_encoding
177196

178197
========================================
179-
4. Changed Functions
198+
5. Changed Functions
180199
========================================
181200

182201
- cURL:
@@ -216,8 +235,12 @@ PHP 5.6 UPGRADE NOTES
216235
. pg_send_query()
217236
. pg_send_query_params()
218237

238+
- unserialize:
239+
Manipulated serialization strings for objects implementing Serializable by
240+
replacing "C:" with "O:" at the start will now produce an error.
241+
219242
========================================
220-
5. New Functions
243+
6. New Functions
221244
========================================
222245

223246
- GMP:
@@ -256,17 +279,17 @@ PHP 5.6 UPGRADE NOTES
256279
Added SplFileObject::fread($length) to complement fwrite() method (>= 5.5.11)
257280

258281
========================================
259-
6. New Classes and Interfaces
282+
7. New Classes and Interfaces
260283
========================================
261284

262285

263286
========================================
264-
7. Removed Extensions
287+
8. Removed Extensions
265288
========================================
266289

267290

268291
========================================
269-
8. Other Changes to Extensions
292+
9. Other Changes to Extensions
270293
========================================
271294

272295
- cURL:
@@ -330,7 +353,7 @@ PHP 5.6 UPGRADE NOTES
330353
as described in https://bugs.php.net/bug.php?id=42614.
331354

332355
========================================
333-
9. New Global Constants
356+
10. New Global Constants
334357
========================================
335358

336359
- LDAP:
@@ -364,7 +387,7 @@ PHP 5.6 UPGRADE NOTES
364387
OPENSSL_DEFAULT_STREAM_CIPHERS string
365388

366389
========================================
367-
10. Changes to INI File Handling
390+
11. Changes to INI File Handling
368391
========================================
369392

370393
- Core:
@@ -389,7 +412,7 @@ PHP 5.6 UPGRADE NOTES
389412
global CA default specification as necessary.
390413

391414
========================================
392-
11. Other Changes
415+
12. Other Changes
393416
========================================
394417

395418
- File upload:

UPGRADING.INTERNALS

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ UPGRADE NOTES - PHP X.Y
99
d. Arginfo changes
1010
e. tsrm_virtual_cwd.h moved to zend_virtual_cwd.h
1111
f. empty strings are interned
12+
g. Additional str_* APIs
13+
h. Addition of zend_hash_reindex
14+
i. Addition of zend_hash_splice
15+
j. An additional parameter is sent to Countable::count()
16+
k. Unserialization of manipulated object strings
17+
l. Removal of IS_CONSTANT_ARRAY and IS_CONSTANT_INDEX hack
1218

1319
2. Build system changes
1420
a. Unix build system changes
@@ -120,8 +126,95 @@ UPGRADE NOTES - PHP X.Y
120126

121127
String created using STR_EMPTY_ALLOC() are now interned.
122128
convert_to_string use STR_EMPTY_ALLOC() for zval when IS_NULL.
123-
STR_FREE() shoud be prefered as efree on such strings can raise memory corruption.
129+
str_efree() shoud be preferred as efree() on such strings can cause memory
130+
corruption.
124131

132+
g. Additional str_* APIs
133+
134+
In addition to the previously existing str_free() and str_efree() macros, the
135+
following macros have been introduced to simplify dealing with potentially
136+
interned strings:
137+
138+
str_efree_rel(str) - efree_rel() if not interned
139+
str_erealloc(str, new_len) - erealloc() or emalloc+memcpy if interned
140+
str_estrndup(str, len) - estrndup() if not interned
141+
str_strndup(str, len) - zend_strndup() if not interned
142+
str_hash(str, len) - INTERNED_HASH(str) if interned,
143+
zend_hash_func(str, len+1) otherwise
144+
145+
h. Addition of zend_hash_reindex
146+
147+
A zend_hash_reindex() function with the following prototype has been added:
148+
149+
void zend_hash_reindex(HashTable *ht, zend_bool only_integer_keys);
150+
151+
If only_integer_keys==0, this function will change all keys to be continuous,
152+
zero-based integers in hash order. If only_integer_keys==1 the same will be
153+
done only for keys that were already integers previously, while leaving
154+
string keys alone.
155+
156+
i. Addition of zend_hash_splice
157+
158+
A zend_hash_splice() macro with the following prototype has been added:
159+
160+
void zend_hash_splice(
161+
HashTable *ht, uint nDataSize, copy_ctor_func_t pCopyConstructor,
162+
uint offset, uint length,
163+
void **list, uint list_count, HashTable *removed
164+
);
165+
166+
This function performs an in-place splice operation on a hashtable:
167+
168+
The elements between offset and offset+length are removed and the elements in
169+
list[list_count] are inserted in their place. The removed elements can be
170+
optionally collected into a hashtable.
171+
172+
This operation reindexes the hashtable, i.e. integer keys will be zero-based
173+
and sequential, while string keys stay intact. The same applies to the
174+
elements inserted into the removed HT.
175+
176+
As a side-effect of this addition the signature of the php_splice() function
177+
changed:
178+
179+
void php_splice(
180+
HashTable *ht, zend_uint offset, zend_uint length,
181+
zval ***list, zend_uint list_count, HashTable *removed TSRMLS_DC
182+
)
183+
184+
This function now directly forwards to zend_hash_splice(), resets the
185+
IAP of ht (for compatibility with the previous implementation) and resets
186+
CVs if the passed hashtable is the global symbol table.
187+
188+
j. An additional parameter is sent to Countable::count()
189+
190+
That parameter denotes the $mode passed to count; it shouldn't affect any
191+
userland code, but any zend_parse_parameters() used with no arguments should
192+
fail. Extensions which implement Countable internally, need to accept one
193+
optional long as parameter.
194+
195+
k. Unserialization of manipulated object strings
196+
197+
Strings requiring unserialization of objects are now explicitly checked
198+
whether the object they contain implements the Serializable interface.
199+
This solves the situation where manipulated strings could be passed for
200+
objects using Serializable to disallow serialization. An object
201+
implementing Serializable will always start with "C:" in the serialized
202+
string, all other objects are represented with starting "O:". Objects
203+
implementing Serializable to disable serialization using
204+
zend_class_unserialize_deny and zend_class_serialize_deny, when
205+
instantiated from the serializer with a manipulated "O:" string at the
206+
start, will most likely be defectively initialized. This is now
207+
fixed at the appropriate place by checking for the presence of the
208+
serialize callback in the class entry.
209+
210+
l. Removal of IS_CONSTANT_ARRAY and IS_CONSTANT_INDEX hack
211+
212+
These two #defines disappeared. Instead we have now IS_CONSTANT_AST which
213+
covers also the functionality IS_CONSTANT_ARRAY bid and furthermore the
214+
hack for marking zvals as constant index with IS_CONSTANT_INDEX is now
215+
superfluous and so removed.
216+
Please note that IS_CONSTANT_AST now has the same value than
217+
IS_CONSTANT_ARRAY had.
125218

126219
========================
127220
2. Build system changes
@@ -133,5 +226,8 @@ UPGRADE NOTES - PHP X.Y
133226
variable. Previously `bison` was assumed to be in $PATH.
134227

135228
b. Windows build system changes
136-
-
137-
229+
- The configure option --enable-static-analyze isn't available anymore.
230+
The new option was introduced --with-analyzer.
231+
- It is possible to disable PGO for single extensions, to do that
232+
define a global variable PHP_MYMODULE_PGO evaluating to false
233+
inside config.w32

0 commit comments

Comments
 (0)