Commit Graph

872 Commits

Author SHA1 Message Date
Christoph M. Becker
3464929d64 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77944: Wrong meta pdo_type for bigint on LLP64
2019-04-27 18:48:09 +02:00
Christoph M. Becker
e561d4100b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77944: Wrong meta pdo_type for bigint on LLP64
2019-04-27 18:47:32 +02:00
Christoph M. Becker
16609880f8 Fix #77944: Wrong meta pdo_type for bigint on LLP64
When actually fetching the data, bigint (unsigned) column values are
returned as integers on LLP64 architectures, so their pdo_type has to
be PDO::PARAM_INT accordingly.
2019-04-27 18:46:27 +02:00
Joe Watkins
161adfff3f
For consistency with Windows, and because ZTS is not experimental or a "maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation 2019-03-23 07:34:54 +01:00
Peter Kokot
6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Nikita Popov
852485d8ec Adjust tests for zpp TypeError change 2019-03-11 11:32:20 +01:00
Gabriel Caruso
6c4e2079c0 Use EXPECT when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2019-03-11 00:05:44 -03:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
dd9a7d91a5 Remove unused PDO_MYSQL_LIB_CHK m4 macro
This was once used by the ext/mysql extension named as MYSQL_LIB_CHK.
The call got removed via fd1578c196. In
PDO this is not called anymore and can be removed.
2019-02-21 21:44:02 +01:00
Nikita Popov
c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Darek Slusarczyk
9eacd9174c Merge branch 'PHP-7.3' into PHP-7.4 2019-02-11 18:47:58 +01:00
Darek Slusarczyk
6f7a47db5d Merge branch 'PHP-7.2' into PHP-7.3 2019-02-11 18:18:57 +01:00
Darek Slusarczyk
83d2bc9b6d Merge branch 'PHP-7.1' into PHP-7.2 2019-02-11 18:08:21 +01:00
Darek Slusarczyk
2eaabf06fc security fix - by default 'local infile' is disabled:
- set default for mysqli.allow_local_infile=0
- explicitly disable PDO::MYSQL_ATTR_LOCAL_INFILE in case of lack of driver options
- add getAttribute support for PDO::MYSQL_ATTR_LOCAL_INFILE
- update existing tests where needed
- add new tests [checking default value and setting on] the 'local infile' in ext/mysqli and ext/pdo_mysql
2019-02-11 18:04:51 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Nikita Popov
270e137ff0 Merge branch 'PHP-7.3' 2019-01-09 09:51:28 +01:00
Lauri Kenttä
63c38c9e49 Fixed bug #77289
Use mysqlnd_restart_psession and mysqlnd_end_psession in PDO MySQL.
This makes sure we free last_message while ZMM is still live.
2019-01-09 09:50:26 +01:00
Gabriel Caruso
cdd8368d6f Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Nikita Popov
6e4b202694 Switch PDO to use serialize_deny
And remove dummy __sleep/__wakeup. This switches the thrown
exception type from PDOException to Exception.
2018-11-26 13:28:14 +01:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
113213f027 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:29:24 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:51:01 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Nikita Popov
f5729ec532 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-19 12:31:55 +02:00
Nikita Popov
c26902911f Merge branch 'PHP-7.1' into PHP-7.2 2018-09-19 12:31:46 +02:00
Nikita Popov
842bec5b3c Fix getColumnMeta() test
Newer MySQL versions are stricter about invalid values. Three issues
are fixed:

* Don't use negative values with ZEROFILL. ZEROFILL implies UNSIGNED.
* Use a legal TIMESTAMP value. TIMESTAMP does not accept a Unix timestamp.
* Specify BIGINT values as strings, to avoid overflows.

This is a cherry-pick of d2dc0a3291 from master.
2018-09-19 12:29:38 +02:00
Nikita Popov
d2dc0a3291 Fix getColumnMeta() test
Newer MySQL versions are stricter about invalid values. Three issues
are fixed:

* Don't use negative values with ZEROFILL. ZEROFILL implies UNSIGNED.
* Use a legal TIMESTAMP value. TIMESTAMP does not accept a Unix timestamp.
* Specify BIGINT values as strings, to avoid overflows.
2018-09-17 17:10:49 +02:00
Peter Kokot
02294f0c84 Make PHP development tools files and scripts executable
This patch makes several scripts and PHP development tools files
executable and adds more proper shebangs to the PHP scripts.

The `#!/usr/bin/env php` shebang provides running the script via
`./script.php` and uses env to find PHP script location on the system.
At the same time it still provides running the script with a user
defined PHP location using `php script.php`.
2018-08-29 20:58:17 +02:00
Peter Kokot
409b5133cc Change some permissions from 755 to 644
This patch syncs file permissions accross the PHP source code files
since these don't need to be executable.
2018-08-28 23:26:49 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
21e3b0c70c Remove trailing whitespace in inc files 2018-02-10 19:20:23 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Nikita Popov
c58b307833 Remove checks for unicode.semantics ini option 2018-02-03 19:50:20 +01:00
Dmitry Stogov
b3e22da745 Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS) 2018-01-22 15:57:00 +03:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Nikita Popov
ac7e8bdbfa Merge branch 'PHP-7.2' 2017-12-17 12:48:11 +01:00
Jaromír Doleček
200bf9b5d7 Fix bug #75615
Remove -I without argument in pdo_mysql config.m4.
2017-12-17 12:47:35 +01:00
Dmitry Stogov
b864e6b58c Move constants into read-only data segment 2017-12-15 01:55:00 +03:00
Dmitry Stogov
0d484172fe Turn "pdo_stmt_methods" into constants. 2017-12-14 22:59:58 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Anatol Belski
756aaaf806 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75018, fixed bug #75177
2017-09-13 14:12:53 +02:00
Anatol Belski
b134793b32 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75018, fixed bug #75177
2017-09-13 14:12:31 +02:00
Anatol Belski
3d93856c4a Fixed bug #75018, fixed bug #75177
Both are caused by the same cast issue in mysqlnd on 32-bit.
2017-09-13 14:10:30 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Xinchen Hui
9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Xinchen Hui
dbd729e86b Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:43:14 +08:00
Nikita Popov
8c1dc840b5 Remove version checks for MySQL < 5.0 2017-07-19 19:34:14 +02:00
Nikita Popov
f9d6cff67e Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 21:45:41 +02:00
Nikita Popov
4e9158da76 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-18 21:45:35 +02:00
YaoGuai
51cdd3dc50 Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
2017-07-18 21:45:02 +02:00
Xinchen Hui
36848f6e08 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Remove unused var
  Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376)
2017-04-07 15:21:57 +08:00
Xinchen Hui
39327b90e3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376)

Conflicts:
	ext/mysqlnd/mysqlnd_ps.c
2017-04-07 15:20:53 +08:00
Yussuf Khalil
27120d4412 Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376) 2017-04-05 20:57:03 +02:00
Adam Baratz
4afce8ec8c Add PDO parameter types for national character set strings 2017-03-20 18:25:50 -04:00
Adam Baratz
d5c57cb163 Remove unused field 2017-03-20 13:05:13 -04:00
Nikita Popov
30be110c5a Merge branch 'PHP-7.1' 2017-03-09 17:32:08 +01:00
Nikita Popov
314ef0ff69 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 17:32:01 +01:00
Thomas Orozco
247ce052cd Fixed bug #71003: Add PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT 2017-03-09 17:31:21 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Matteo Beccati
d060060c08 Merge branch 'PHP-7.1'
* PHP-7.1:
  Skip tests when secure_file_priv dir not writable
  Add missing UPGRADING entry. Manual is updated before 7.0 release.
2016-12-15 09:32:26 +01:00
Matteo Beccati
72fb941bd4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip tests when secure_file_priv dir not writable
  Add missing UPGRADING entry. Manual is updated before 7.0 release.
2016-12-15 09:32:04 +01:00
Matteo Beccati
7c696fa886 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Skip tests when secure_file_priv dir not writable
2016-12-15 09:31:54 +01:00
Matteo Beccati
0c9324ea9b Skip tests when secure_file_priv dir not writable 2016-12-15 09:31:00 +01:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Nikita Popov
45f7b2bcc8 Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
2016-11-20 22:31:24 +01:00
Pedro Magalhães
9c5af4e4cb Remove the b prefix from literals on unrelated tests 2016-11-20 21:11:53 +01:00
Tom Van Looy
442fd2f92a Cleanup tests version checks 2016-11-20 14:16:50 +01:00
Adam Baratz
0eeb06bf17 Addendum to #73234: Assume param types are nullable 2016-10-12 11:59:01 -04:00
Adam Baratz
6ddfce116b Fix tests affected by 32b6154a61 2016-10-11 10:15:50 -04:00
Adam Baratz
0785a5e6dc Fix message typos in PDO tests 2016-08-24 18:39:37 -04:00
Xinchen Hui
3f1e9ed8f8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
  Remove typo'd commit
  Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
2016-08-09 11:32:34 +08:00
Keyur
a74c7cb528 Remove typo'd commit 2016-08-09 01:36:15 +00:00
Keyur
3f25c4228a Fix bug 72788: Invalid memory access when database_object_handle
is undefined. Also fix memory leak in dbh_free when using persistent
PDO connections.
2016-08-09 00:16:46 +00:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Nikita Popov
b2245c5592 Merge branch 'PHP-7.0' 2016-02-13 17:48:58 +01:00
Nikita Popov
f43fe8cb4c Merge branch 'PHP-5.6' into PHP-7.0 2016-02-13 17:48:17 +01:00
Nikita Popov
adcdb4f7ba Fix test description 2016-02-13 17:46:24 +01:00
Nikita Popov
464f48ec1c Merge branch 'PHP-7.0' 2016-02-13 15:21:38 +01:00
Nikita Popov
70c8db08c6 Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/pdo_mysql/mysql_driver.c
2016-02-13 15:21:16 +01:00
Nikita Popov
bc419fee5c FIx bug #71569
convert_to_string() may result in an interned string.
2016-02-13 15:17:51 +01:00
Nikita Popov
93dc91b386 Remove version checks
PHP_VERSION_ID
PHP_API_VERSION
ZEND_MODULE_API_NO
PHP_MAJOR_VERSION, PHP_MINOR_VERSION
ZEND_ENGINE_2

I've left litespeed alone, as it seems to genuinely maintain support
for many PHP versions.
2016-01-30 15:35:28 +01:00
Xinchen Hui
c1b73ff8af Merge branch 'PHP-7.0' 2016-01-04 05:39:20 -08:00
Xinchen Hui
36b4311edd Do not edit the value in place (might be relates to #71261) 2016-01-04 05:38:15 -08:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Julien Pauli
5adac3c2d0 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed and improved tests
  test to function socket_getopt();
  test to function socket_clear_error();;
  test to function socket_shutdown();
  test to function socket_send();
  test to function gethostname ( void );
  test to function DateTimeZone::getLocation();
  test to function stream_get_transports();
  test to function stream_get_wrappers();
  test to function stream_socket_enable_crypto();
  test to function stream_socket_get_name();
  Create stream_socket_recvfrom.phpt
  test to stream function set_file_buffer.phpt();
  test to function PDO_getAvaliableDrivers;
  test to misc. function connection_status();
  test to function connection_aborted();
  test to function memory_get_peak_usage();
2015-12-24 14:13:36 +01:00
Julien Pauli
048fb4b00f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed and improved tests
  test to function socket_getopt();
  test to function socket_clear_error();;
  test to function socket_shutdown();
  test to function socket_send();
  test to function gethostname ( void );
  test to function DateTimeZone::getLocation();
  test to function stream_get_transports();
  test to function stream_get_wrappers();
  test to function stream_socket_enable_crypto();
  test to function stream_socket_get_name();
  Create stream_socket_recvfrom.phpt
  test to stream function set_file_buffer.phpt();
  test to function PDO_getAvaliableDrivers;
  test to misc. function connection_status();
  test to function connection_aborted();
  test to function memory_get_peak_usage();
2015-12-24 14:08:59 +01:00
Julien Pauli
d73d9fecf6 Fixed and improved tests 2015-12-24 14:08:44 +01:00
marcosptf
4f528e5c95 test to function PDO_getAvaliableDrivers;
was add new function to PDO::getAvailableDrivers
2015-12-24 10:45:39 +01:00
Xinchen Hui
5bdc5f4e2b Merge branch 'PHP-7.0' 2015-11-16 17:59:54 +08:00
Xinchen Hui
9134f9e98f Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/mysql/php_mysql.c
2015-11-16 17:59:46 +08:00
Xinchen Hui
be6fd4ba89 Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
Actually, this only be fixed if php uses mysqlnd
2015-11-16 16:59:55 +08:00
Andrey Hristov
0a7e08d385 MNDR:
- cleanup in mysqlnd_result.c
- switch from zend_ulong to size_t for lengths. Accordingly change
  mysqli and pdo_mysql for this.
2015-11-12 16:19:16 +01:00
Anatol Belski
01c844a01d use Z* macro name 2015-11-05 22:39:10 +01:00
Anatol Belski
1406f80135 fix leak 2015-11-05 21:49:21 +01:00
Anatol Belski
7b32b8f4e1 fix pdo_mysql crash with empty bound stream param
rel #70862
2015-11-05 21:32:31 +01:00
Daniel Persson
73384728ca Fix bug #64172
Check if the SQLSTATE error code is equal to PDO_ERR_NONE before we ask the driver.
And if no error is reported skip the extra call to the driver.
2015-10-18 17:06:54 -07:00
Daniel Persson
307c1f6bf0 Fix bug #64172
Check if the SQLSTATE error code is equal to PDO_ERR_NONE before we ask the driver.
And if no error is reported skip the extra call to the driver.
2015-10-18 17:03:39 -07:00
Dmitry Stogov
ccb677ece8 Fixed test running on MarinaDB. 2015-10-07 12:21:43 +03:00
Xinchen Hui
014abbc840 Merge branch 'PHP-5.6'
Conflicts:
	ext/pdo/pdo_dbh.c
	ext/pdo/php_pdo_driver.h
2015-08-30 05:32:37 -07:00
Xinchen Hui
ef1bd8f0e6 Fixed bug #70389 (PDO constructor changes unrelated variables) 2015-08-30 05:02:38 -07:00
Anatol Belski
4ad0714d76 fork test 2015-08-20 13:32:29 +02:00
Xinchen Hui
dca6d1027a Fixed bug #70272 (Segfault in pdo_mysql) 2015-08-18 18:33:07 +08:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Dmitry Stogov
70c86732cb Use zend_string to represent pdo_column_data.name and avoid duplication. 2015-05-05 16:19:51 +03:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Nikita Popov
30d59aed1c Try fixing PDO MySQL pconnect test
Use less aggressive conversion to exceptions, in particular
do not convert warnings that happen during check_liveness. If the
server has gone away this will just reconnect and we still end up
with a valid connection, so it shouldn't throw.

Also drop some unnecessary checks for malloc returning NULL.
2015-04-04 16:00:17 +02:00
Ferenc Kovacs
956fa034e3 Merge branch 'PHP-5.6'
* PHP-5.6:
  sigh, can't even copypaste without screwing up
2015-04-02 00:07:20 +02:00
Ferenc Kovacs
9806a37a79 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  sigh, can't even copypaste without screwing up
2015-04-02 00:07:13 +02:00
Ferenc Kovacs
9991b8ecee sigh, can't even copypaste without screwing up 2015-04-02 00:07:00 +02:00
Ferenc Kovacs
6923f081b7 Merge branch 'PHP-5.6'
* PHP-5.6:
  oop, put both the error number and message for both db object to the error message
2015-04-01 23:06:32 +02:00
Ferenc Kovacs
e70e2d8310 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  oop, put both the error number and message for both db object to the error message
2015-04-01 23:06:22 +02:00
Ferenc Kovacs
7c1a1189be oop, put both the error number and message for both db object to the error message 2015-04-01 23:06:04 +02:00
Ferenc Kovacs
0328a60eec Merge branch 'PHP-5.6'
* PHP-5.6:
  test fixes
2015-04-01 22:08:29 +02:00
Ferenc Kovacs
faab430141 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  test fixes
2015-04-01 22:08:11 +02:00
Ferenc Kovacs
0a41af216e test fixes 2015-04-01 22:07:52 +02:00
Dmitry Stogov
1018f462d8 Patch improvement:
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Anatol Belski
19360f386e cleanup mod version macros, round 3 2015-03-23 20:54:55 +01:00
Dmitry Stogov
a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Adam Harvey
7fa1009560 Like Shady, --with-mysql-sock is back.
As Matteo pointed out, MySQLi and PDO_MySQL both rely on this.
2015-03-05 19:00:02 +00:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Maxime BESSON
f384971552 Look for PDO include files in the right folder
Configure scripts for extensions look for PDO include files in
$prefix/include/php. This change makes them look into $phpincludedir
instead, which may be different from $prefix/include/php.
2015-02-06 12:06:29 +01:00
Stanislav Malyshev
dfe6aea9ca size_t cleanup for PDO 2015-01-26 16:16:02 -08:00
Anatol Belski
29688512b4 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  PDO_MySQL: Differentiate between linux and win32 when passing unix_socket

Conflicts:
	ext/pdo_mysql/mysql_driver.c
2015-01-15 17:51:43 +01:00
Anatol Belski
3d6a83a7d0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  PDO_MySQL: Differentiate between linux and win32 when passing unix_socket
2015-01-15 17:48:11 +01:00
steffen
7c9633412e PDO_MySQL: Differentiate between linux and win32 when passing unix_socket
Unix uses "127.0.0.1" as default host for named pipes,
while when using Windows a "." is required as host by mysqlnd.
(This can be seen at mysqlnd.c (line 945 or searching #ifndef PHP_WIN32)
2015-01-15 16:42:51 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Matteo Beccati
a51de2168d Merge branch 'PHP-5.6'
* PHP-5.6:
  Update test after fixing bug #68371
2015-01-05 12:12:02 +01:00
Matteo Beccati
38f1b569c2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Update test after fixing bug #68371
2015-01-05 12:11:46 +01:00
Matteo Beccati
ea1c0c5627 Update test after fixing bug #68371 2015-01-05 12:11:16 +01:00
Matteo Beccati
7d0887a229 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names
2015-01-05 10:48:40 +01:00
Matteo Beccati
488d3dac2e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names
2015-01-05 10:48:18 +01:00
Matteo Beccati
7d2f8525d8 Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names 2015-01-05 09:25:48 +01:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
ba35b22bc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (35 commits)
  Fixed bug #68398 msooxml matches too many archives
  Fix zpp call in apache_getenv()
  Drop unnecessary zval containers
  fixed test
  C89 compat
  add include for missing localeconv_r proto
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
  Fix compilation error (ref #68424)
  Removed useless handlers
  Move checks for references into slow paths of operator functions. Remove duplicate opcode handlers.
  Revert unintentional docblock change
  Restored zip/oci8 PHP 4 code, add PHP 7 checks
  Note macro removal in UPGRADING.INTERNALS
  Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!)
  Zend Engine 3
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Start adding new attribute to control multi statements
  ...
2014-12-06 21:37:15 +01:00
Anatol Belski
42d7cb4c2c Merge branch 'PHP-5.6'
* PHP-5.6:
  C89 compat
  add include for missing localeconv_r proto
2014-12-06 12:18:36 +01:00
Anatol Belski
08241ee3f3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  C89 compat
  add include for missing localeconv_r proto
2014-12-06 12:18:05 +01:00
Anatol Belski
9016018ccc C89 compat 2014-12-06 12:14:17 +01:00
Matteo Beccati
b120f9beb2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix compilation error (ref #68424)
2014-12-06 10:24:27 +01:00
Matteo Beccati
625b929c6e Fix compilation error (ref #68424) 2014-12-06 10:23:56 +01:00
Julien Pauli
5a528076d2 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  Start adding new attribute to control multi statements
2014-12-05 17:06:33 +01:00
Julien Pauli
5104c2bbc3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
  Start adding new attribute to control multi statements
2014-12-05 17:05:37 +01:00
pwolanin
4c0bd5e77a Start adding new attribute to control multi statements 2014-12-05 17:03:31 +01:00
Anatol Belski
3ca0ca1548 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (102 commits)
  fix dir separator in test
  fix TS build
  fix TS build
  Better fix for bug #68446
  Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
  Revert NEWS and set test to XFAIL
  Revert "Fix bug #68446 (bug with constant defaults and type hints)"
  Improved zend_hash_clean() and added new optimized zend_symtable_clean()
  Use inline version of zval_ptr_dtor()
  Added new optimized zend_array_destroy() function
  Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
  fix REGISTER_NS_*_CONSTANT macros
  Removed useless assert. EG(uninitialized_zval) can't be refcounted.
  Use specialized destructors when types of zvals are known.
  move tests into proper place
  Improved assignment to object property
  Reuse zend_assign_to_variable() in zend_std_write_property()
  cleanup comments from svn/cvs era
  fix dir separator in test
  fork test for windows
  ...
2014-11-26 08:17:35 +01:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Matteo Beccati
3e4b91ec7f Fixed bug #68371 PDO#getAttribute() cannot be called with platform-specific attribute names 2014-11-10 08:16:35 +01:00
Anatol Belski
aac7b1db7c converted ext/sqlite and ext/pdo_mysql to use static tsrmls cache 2014-10-16 18:50:19 +02:00
Timm Friebe
e83580c1f0 Merge branch 'master' into catchable-fatals/methods-on-non-objects 2014-09-25 19:45:05 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Xinchen Hui
39c3207896 Revert previous commit by mistake 2014-09-04 11:59:58 +08:00
Xinchen Hui
e90ec235dc Use PHP_GINIT to suppress incompatible pointer type 2014-09-04 11:56:13 +08:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
28b7a03318 master renamings phase 5 2014-08-25 21:20:44 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
eb1871b3fb yet trivial fixes to mysql exts 2014-08-21 09:54:40 +02:00
Anatol Belski
4ed156d4df ported from pdo - pgsql, odbc, mysql, firebirt, dblib 2014-08-19 19:02:07 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Timm Friebe
c3d214aa08 MFH 2014-08-16 17:38:20 +02:00
Xinchen Hui
da3aeeed39 clean up - avoid realloc 2014-08-13 15:51:43 +08:00