Commit graph

364 commits

Author SHA1 Message Date
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
49bac9b77b Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Joe Watkins
30019f47a5
improvements to cli server 2019-07-03 16:30:51 +02:00
Joe Watkins
82effb3fc7
implement support for workers in cli-server on platforms supporting fork 2019-06-29 05:27:35 +02:00
Simon Welsh
6e3438bc62 Include the request method in CLI server logs 2019-05-02 23:32:22 +03:00
Nikita Popov
7f6c22cb3d Fix last maybe uninit warnings on 7.4
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Peter Kokot
5f8915786f Remove HAVE_SIGNAL_H
The `<signal.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since file requires at least C89 or greater, the `HAVE_SIGNAL_H` symbol
defined by Autoconf in Zend.m4 [2] can be ommitted and simplifed.

The bundled libmagic (file) also ommits the usage of HAVE_SIGNAL_H since
5.35 however current version in PHP is very modified 5.34 version and
will be refactored separately. Check for HAVE_SIGNAL_H is therefore
still done in the configure.ac.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2019-04-07 15:55:34 +02:00
Peter Kokot
0d2dadc0e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  Fix #77794: Incorrect Date header format in built-in server
2019-03-25 21:57:39 +01:00
Peter Kokot
58e00df9fe Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  [ci skip] Update NEWS
  Fix #77794: Incorrect Date header format in built-in server
2019-03-25 21:56:39 +01:00
Niklas Keller
7f9872387e Fix #77794: Incorrect Date header format in built-in server
- Fix the date format to be compliant with https://tools.ietf.org/html/rfc7231#section-7.1.1.2
- Fix date format length and use GMT time
- Previously, local time was used instead of GMT.
- Remove extra whitespace
- Simplify string appends in php_cli_server.c
2019-03-25 21:41:45 +01:00
Dmitry Stogov
04b67bac32 Avoid reinitailization of ZTS cache pointer. Initialize it once in TSRM.c 2019-03-12 17:35:50 +03:00
Nikita Popov
5b778e852e Merge branch 'PHP-7.3' into PHP-7.4 2019-03-12 09:58:29 +01:00
Nikita Popov
a7739be22f Fixed bug #77722 2019-03-12 09:58:09 +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
Peter Kokot
a1b5698d4e Remove HAVE_TIME_H
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_TIME_H` symbol
defined by Autoconf in ext/pdo_sqlite/config.m4 [2] can be ommitted and
simplifed.

Additionally, since PHP didn't define `HAVE_TIME_H` prior in the
configure.ac the occurrence of this symbol in cli can be removed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-21 14:10:30 +02:00
Peter Kokot
be49d61b19 Remove old SVN keywords substitutions
When the PHP source code was versioned in Subversion, there was
possible to substitute certain keywords such as $Id$ with revision
number, last change time and author name. Such approach is not used
in Git so this patch removes these outdated artifacts from source
code files.
2018-06-16 13:04:30 +02: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
Anatol Belski
038a2e4756 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
2018-05-13 18:43:12 +02:00
Anatol Belski
398204ace9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
2018-05-13 18:42:36 +02:00
Anatol Belski
ad787626a4 Fixed bug #76333 PHP built-in server does not find files if root path contains special characters 2018-05-13 18:40:32 +02:00
Mark Seuffert
193c02875a No Content-Type header if MIME type is unknown 2018-04-14 13:08:53 +02:00
Nikita Popov
b942648771 Merge branch 'PHP-7.2' 2018-01-12 18:18:45 +01:00
Nikita Popov
f8c889760c Merge branch 'PHP-7.1' into PHP-7.2 2018-01-12 18:18:34 +01:00
Nikita Popov
9e98e99a3a Revert "Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)"
This reverts commit 816758eda2.

After this commit relative router scripts were resolved against
docroot rather than shell cwd.
2018-01-12 18:11:12 +01: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
Anatol Belski
af55904f18 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #73830 Directory does not exist.
2017-11-28 12:43:03 +01:00
Anatol Belski
79940993de Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73830 Directory does not exist.
2017-11-28 12:42:40 +01:00
Anatol Belski
578049fdb6 Fixed bug #73830 Directory does not exist. 2017-11-28 12:41:49 +01:00
Anatol Belski
85021602ba Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update NEWS
  Fix bug 60471 by correctly identifying unused speculative preconnections
2017-11-14 20:03:02 +01:00
Sammy Kaye Powers
3bc5c9f118 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-11-14 20:00:45 +01:00
Dmitry Stogov
749db50a36 Added exceptions for ZEND_RC_DEBUG 2017-11-02 14:40:28 +03:00
Xinchen Hui
9f5ed133b3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)
2017-10-15 10:29:28 +08:00
Xinchen Hui
49702ad7fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)
2017-10-15 10:28:46 +08:00
Xinchen Hui
816758eda2 Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function) 2017-10-15 10:28:28 +08:00
Nikita Popov
d78a7909c8 Merge branch 'PHP-7.1' into PHP-7.2 2017-09-05 18:14:16 +02:00
Nikita Popov
0b69ce72b8 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-05 18:14:10 +02:00
Nikita Popov
42549b7844 Add missing null termination 2017-09-05 18:13:50 +02:00
Nikita Popov
9fbd8620fb Merge branch 'PHP-7.1' into PHP-7.2 2017-09-05 16:24:40 +02:00
Nikita Popov
e866e05b0d Merge branch 'PHP-7.0' into PHP-7.1 2017-09-05 16:24:21 +02:00
Bouke van der Bijl
cd9d90f4d4 Fixed bug #70470 2017-09-05 16:23:32 +02: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
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
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00