History log of /PHP-8.4/sapi/cli/php_cli_server.c (Results 1 – 25 of 327)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 06efe44c 13-Oct-2024 Ilija Tovilo

Skip shebang in cli-server router script

Fixes GH-16373
Closes GH-16403


# 3d80d98a 01-Oct-2024 David Carlier

Fix GH-16137: "Deduplicate" http headers values but Set-Cookie.

Those are meant to have 1 or plus values separated by a comma even
if the client set them separately.

close GH-1

Fix GH-16137: "Deduplicate" http headers values but Set-Cookie.

Those are meant to have 1 or plus values separated by a comma even
if the client set them separately.

close GH-16154

show more ...


# 02177848 14-Aug-2024 Gina Peter Banyard

Replace uses of php_dirname() with zend_dirname() (#15393)

This removes some needs to include the php_string.h header


# 9c537de8 10-Aug-2024 Christoph M. Becker

Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)

While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions

Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)

While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time. Still, obviously, MSVC is fine with having the declarations
during compile time.

show more ...


# 11accb5c 25-Jun-2024 Arnaud Le Blanc

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

-I$(top_builddir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/main
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
-I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

-I$(top_builddir)/main
-I$(top_builddir)
-I$(top_srcdir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.

show more ...


# cf3b9fca 24-Jun-2024 Peter Kokot

Sync #if/ifdef/defined (-Wundef) (#14623)

These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_

Sync #if/ifdef/defined (-Wundef) (#14623)

These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_SETENV
- HAVE_SYS_SELECT_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_WAIT_H
- HAVE_UNSETENV
- RFC3678_API
- ZEND_ENABLE_ZVAL_LONG64
- ZTS

Follow-up of GH-5526

show more ...


# 5d3fab93 11-Jun-2024 Peter Kokot

Sync #if/ifdef/defined (#14520)

These are either undefined or defined (to value 1):
- __DragonFly__
- __FreeBSD__
- HAS_MCAST_EXT
- HAVE_GETCWD
- HAVE_GETWD
- HAVE_GL

Sync #if/ifdef/defined (#14520)

These are either undefined or defined (to value 1):
- __DragonFly__
- __FreeBSD__
- HAS_MCAST_EXT
- HAVE_GETCWD
- HAVE_GETWD
- HAVE_GLIBC_ICONV
- HAVE_JIT
- HAVE_LCHOWN
- HAVE_NL_LANGINFO
- HAVE_RL_CALLBACK_READ_CHAR
- HAVE_RL_ON_NEW_LINE
- HAVE_SQL_EXTENDED_FETCH
- HAVE_UTIME

Follow up of GH-5526 (-Wundef)

show more ...


# 84a0da15 09-Jun-2024 Peter Kokot

Sync #if/ifdef/defined (#14508)

This syncs CPP macro conditions:
- _WIN32
- _WIN64
- HAVE_ALLOCA_H
- HAVE_ALPHASORT
- HAVE_ARPA_INET_H
- HAVE_CONFIG_H
- HAVE_DIRE

Sync #if/ifdef/defined (#14508)

This syncs CPP macro conditions:
- _WIN32
- _WIN64
- HAVE_ALLOCA_H
- HAVE_ALPHASORT
- HAVE_ARPA_INET_H
- HAVE_CONFIG_H
- HAVE_DIRENT_H
- HAVE_DLFCN_H
- HAVE_GETTIMEOFDAY
- HAVE_LIBDL
- HAVE_POLL_H
- HAVE_PWD_H
- HAVE_SCANDIR
- HAVE_SYS_FILE_H
- HAVE_SYS_PARAM_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_TIME_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_WAIT_H
- HAVE_UNISTD_H
- PHP_WIN32
- ZEND_WIN32

These are either undefined or defined to 1 in Autotools and Windows.

Follow up of GH-5526 (-Wundef).

show more ...


# 2d66562e 28-May-2024 Peter Kokot

Sync HAVE_IPV6 and HAVE_GETADDRINFO in #if/ifdef/defined (#14341)

Follow up of GH-5526 (-Wundef)


# 8e62e2b8 22-May-2024 Cristian Rodríguez

Mark multple functions as static (#13864)

* Mark many functions as static

Multiple functions are missing the static qualifier.

* remove unused struct sigactions

st

Mark multple functions as static (#13864)

* Mark many functions as static

Multiple functions are missing the static qualifier.

* remove unused struct sigactions

struct sigaction act, old_term, old_quit, old_int;
all unused.

* optimizer: minXOR and maxXOR are unused

show more ...


# cd66fcc6 17-Jun-2023 Ilija Tovilo

Add request_parse_body() function

RFC: https://wiki.php.net/rfc/rfc1867-non-post

This function allows populating the $_POST and $_FILES globals for non-post
requests. This avoid

Add request_parse_body() function

RFC: https://wiki.php.net/rfc/rfc1867-non-post

This function allows populating the $_POST and $_FILES globals for non-post
requests. This avoids manual parsing of RFC1867 requests.

Fixes #55815
Closes GH-11472

show more ...


# c149b4f5 30-Jan-2024 Ilija Tovilo

Fix missing syntax error message in cli-server router script

Fixes GH-13113
Closes GH-13275


# d7d0d19d 21-Dec-2023 Ilija Tovilo

Support index.php fallback for files in built-in server

If no router script is used, the built-in webserver will now look for a fallback
index file recursively in all cases, including UR

Support index.php fallback for files in built-in server

If no router script is used, the built-in webserver will now look for a fallback
index file recursively in all cases, including URLs with a period.

Fixes GH-12604
Closes GH-12992

show more ...


# 8876639d 09-Jan-2024 Ilija Tovilo

Add X-Powered-By header to builtin 404 page (#13092)

As requested by https://github.com/php/php-src/pull/12992/files/30929c9a887ef7917a346bfeb76c82274ad31aca#r1434156785.


# 299c3ba8 06-Dec-2023 Ilija Tovilo

Fix max_execution_time with cli-server router script

When the cli-server specifies a router script, we run it using
zend_execute_scripts instead of php_execute_script, because the former

Fix max_execution_time with cli-server router script

When the cli-server specifies a router script, we run it using
zend_execute_scripts instead of php_execute_script, because the former preserves
the return value of the script. However, php_execute_script also starts resets
the execution timer with the value from max_execution_time. If the timer has
previously been initialized with max_input_time, it will never be reset, and
thus trigger at the incorrect time.

Closes GH-12886

show more ...


# f6ac08c6 05-Oct-2023 coppolafab

php_cli_server: ensure single date header is present

Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a chec

php_cli_server: ensure single date header is present

Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a check condition before append the header, and a test file.

Closes GH-12363.

show more ...


# af77d3b8 21-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11716: cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1

Closes GH-11757.


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


# c02348cf 05-May-2023 Cédric Anne

Make SERVER_SOFTWARE compliant with RFC3875 (#11093)


# 382148d7 26-Feb-2023 George Peter Banyard

Fix UBSAN warning about applying zero offset to null pointer (#10700)

vpath may be NULL here so check for it before trying to add 0 (the length of the vpath) to it.


# d46dea16 18-Feb-2023 Max Kellermann

Make globals const (part 2) (#10610)

* Zend/zend_enum: make `forbidden_methods` static+const

* main/php_syslog: make `xdigits` static

* sapi/fpm: make several globals `cons

Make globals const (part 2) (#10610)

* Zend/zend_enum: make `forbidden_methods` static+const

* main/php_syslog: make `xdigits` static

* sapi/fpm: make several globals `const`

* sapi/phpdbg: make `OPTIONS` static

* sapi/phpdbg/help: make help texts const

* sapi/cli: make `template_map` const

* ext/ffi: make `zend_ffi_types` static

* ext/bcmath: make `ref_str` const

* ext/phar: make several globals static+const

show more ...


# c8955c07 16-Jan-2023 Christoph M. Becker

Revert GH-10220

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491d66081298a16634629f149459706a9.
This reverts commit 588a07

Revert GH-10220

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491d66081298a16634629f149459706a9.
This reverts commit 588a07f7371ee2b5fac17de147926780e427fae6.
This reverts commit f377e15751d3aa48b69cd9bcc366ede7803d511f.
This reverts commit b4ba16fe189b109144aff669e11d81365160104b.
This reverts commit 694ec1deea36e366b28b6349a52be49824e1a1a8.
This reverts commit 6b34de8eba9f66882ae16e6073af28783670ac53.
This reverts commit aa1cd02a4367834026ea2205ea13a2f904455aa1.
This reverts commit 308fd311ea6fcf3094b448df7f2b264f08e4fe4f.
This reverts commit 16203b53e1822a37b6ba6f2ab198bb435d05fdad.
This reverts commit 738fb5ca5412f5e833a7fab82b11519e635a3357.
This reverts commit 9fdbefacd3c382d731aa175b7bdc002ec9cb2b30.
This reverts commit cd4a7c1d90562ebb5f89caf94d00d579631b9fbe.
This reverts commit 928685eba2b2f0ded90e7f78fd806ea164002f6e.
This reverts commit 01e5ffc85cd4357fd7b5b7ceefa29f2d10ca26b7.

show more ...


# 6b34de8e 04-Jan-2023 Max Kellermann

sapi/*: add missing includes


# 84988d20 17-Dec-2022 David Carlier

cli server addressing few todos.

Closes GH-10124.


# d52f0451 08-Oct-2022 Ilija Tovilo

Fix cli server blocking on accept when using multiple workers

Fixes GH-9400
Closes GH-9693


12345678910>>...14