Commit graph

867 commits

Author SHA1 Message Date
Richard Fussenegger
5fa1cd224b Fixed php_socket_t to int conversion
This warning was about a possible loss of data due to the downcast of `php_socket_t` to `int`. The former maps to a platform specific type, hence, it might downcast from a 64 bit integer to a 32 bit intger.

Fixed possibly overflowing vars

Due to the change from `int` to `php_socket_t` some variables might overflow now. Changed all variables that might be affected.

Revert "Fixed possibly overflowing vars"

This reverts commit bf64fd5984.

Use aliased PHP socket type

Using the alias protects us from changes to the underlying type.

Removed ignored nfds argument

The `nfds` argument to the Win32 `select` function is always ignored, regardless of its actual value. Hence, we should not pass it in the first place. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx for reference.

Target value is not a pointer

Avoid overflow in loop
2017-06-15 23:48:03 +02:00
Xinchen Hui
e33bc38e83 Merge branch 'PHP-7.1'
* PHP-7.1:
  Add simple cli test for PATH/HOST ini sections
  Fixed bug #74600
2017-06-12 17:21:45 +08:00
Xinchen Hui
caf35c5cf5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add simple cli test for PATH/HOST ini sections
  Fixed bug #74600
2017-06-12 17:21:35 +08:00
Manuel Mausz
91f129ebf7 Add simple cli test for PATH/HOST ini sections 2017-06-09 23:28:19 +02:00
Remi Collet
37a16a32c9 missing fix for another test 2017-05-29 12:07:13 +02:00
Anatol Belski
38ee9f7c0d extend condition 2017-05-27 13:30:55 +02:00
Anatol Belski
e5c273dc0e Turn interactive mode on, if cli binary is clicked in filemanager 2017-05-25 21:04:56 +02:00
Xinchen Hui
23ea38d8f7 Merge branch 'PHP-7.1'
* PHP-7.1:
  Added cleanup
2017-05-17 23:25:34 +08:00
Xinchen Hui
78b10dd9d6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Added cleanup
2017-05-17 23:25:17 +08:00
Xinchen Hui
0954ea8d6d Added cleanup 2017-05-17 23:24:58 +08:00
Xinchen Hui
af0c443dde Merge branch 'PHP-7.1'
* PHP-7.1:
  Added test for bug #74600
2017-05-17 23:21:42 +08:00
Xinchen Hui
f38487a0e0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Added test for bug #74600
2017-05-17 23:21:38 +08:00
Xinchen Hui
ef09bc0645 Added test for bug #74600 2017-05-17 23:21:18 +08:00
Sammy Kaye Powers
fd0e71d001 Fix bug 60471 by correctly identifying unused speculative preconnections
* Correctly identify unused speculative preconnections from browsers
  like Chrome and Firefox
* Add a new message to the debug level that is emitted when a TCP
  connection is closed without sending any request (a preconnection)
* Fix an issue where the existing debug messages were not being
  displayed even when debug mode was enabled
2017-04-11 15:08:05 -07:00
Anatol Belski
1459d5dc18 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix buffer overflow
2017-04-03 14:25:37 +02:00
Anatol Belski
2ec54af8df fix buffer overflow 2017-04-03 14:22:23 +02:00
Rowan Collins
1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Thomas Punt
932c4b35dc Remove more unnecessary checks on Zend's allocator functions 2017-03-16 12:23:55 +01:00
Joe Watkins
409467dc2f
Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove remnants of TSMRLS_* macro calls
2017-01-18 17:46:35 +00:00
Joe Watkins
bbe21ccf38
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove remnants of TSMRLS_* macro calls
2017-01-18 17:46:11 +00:00
Thomas Punt
fb8486f3bd
Remove remnants of TSMRLS_* macro calls 2017-01-18 17:42:45 +00:00
Joe Watkins
28391c30ca
Merge branch 'PHP-7.1'
* PHP-7.1:
  Increase wait time for tests involving sockets to improve Travis relability
2017-01-13 06:45:31 +00:00
Joe Watkins
19363de12f
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase wait time for tests involving sockets to improve Travis relability
2017-01-13 06:45:17 +00:00
Mitch Hagstrand
fd92b91188
Increase wait time for tests involving sockets to improve Travis relability
1. Increased sleep time from 25ms to 50ms
2. Added sleep to shutdown handlers
2017-01-13 06:45:04 +00:00
Joe Watkins
e54ee3eaa4
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #73902 mention router support in usage output for php-cli
2017-01-10 06:21:14 +00:00
Joe Watkins
aadc84f6f7
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73902 mention router support in usage output for php-cli
2017-01-10 06:20:56 +00:00
Joe Watkins
125ee6a68e
Fixed #73902 mention router support in usage output for php-cli 2017-01-10 06:19:34 +00: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
Nikita Popov
52da05c535 Merge branch 'PHP-7.1' 2017-01-01 21:17:00 +01:00
Nikita Popov
a5027d43dd Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 21:09:27 +01:00
Nikita Popov
935b5cb11e Flush stderr on win32 in cli_log_message
This allows us to unfork a bunch of tests for Windows.
2017-01-01 21:09:02 +01:00
Nikita Popov
1bf67622f8 Merge branch 'PHP-7.1' 2016-12-27 21:52:56 +01:00
Nikita Popov
937115f8c5 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-27 21:52:33 +01:00
Mitch Hagstrand
2d51267c07 Makes the sapi web server and curl tests more reliable
1. Increased the time for the sapi/cli/tests/php_cli_server.inc to accept connections.
2. sapi/cli/tests/php_cli_server.inc has errors messages and a `stop` function.
3. bug67429.phpt uses the `stop` function to shutdown the webserver before starting a new one.
4. Removed ext/curl/tests/bug48203_multi-win32.phpt test now that ext/curl/tests/bug48203_multi.phpt
   runs on Windows also.
2016-12-27 21:52:05 +01:00
Anatol Belski
758af77e9d Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
2016-12-22 14:56:47 +01:00
Anatol Belski
afb6ca2566 Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
2016-12-22 14:32:02 +01:00
Anatol Belski
b6ed31959c Merge branch 'PHP-7.1'
* PHP-7.1:
  extend skipif
2016-11-18 02:26:44 +01:00
Anatol Belski
b2b63ce993 extend skipif
This test won't pass on Windows. The main reason is that the multiline
input is not really possible to create on cmd. But also, because of the
single quotes. And without multiline data piping, it doesn't make sense.
2016-11-18 02:23:17 +01:00
Joe Watkins
a2bc7cf9ca Merge branch 'master' of git.php.net:/php-src 2016-11-12 17:30:41 +00:00
Andrea Faulds
3ed8b7a87b Use "Standard input code" instead of "php://stdin" 2016-11-12 17:26:20 +00:00
Andrea Faulds
a103aa2dbd Show "php://stdin" instead of "-" in error messages 2016-11-12 17:26:20 +00:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Anatol Belski
2860fd40d6 Better fix for bug #73360
This also fixes the TS issue. And, it also reveals that there's an
issue in the VCWD_* API to be possibly addressed.
2016-10-21 21:29:35 +02:00
Anatol Belski
fbf46d36ca Revert "Fixed bug #73360 Unable to work in root with unicode chars"
This reverts commit 64fee0aecb.
2016-10-21 20:15:16 +02:00
Anatol Belski
64fee0aecb Fixed bug #73360 Unable to work in root with unicode chars 2016-10-21 15:22:59 +02:00
Anatol Belski
53034feda5 pull ps_title behind the logic to support the current codepage 2016-08-11 13:38:28 +02:00
Nikita Popov
2fbfa7f62e Merge branch 'PHP-7.0' into PHP-7.1 2016-08-09 15:35:04 +02:00