dunglas
Repos
379
Followers
2983
Following
34

Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.

7588
856

An open, easy, fast, reliable and battery-efficient solution for real-time communications

3058
223

Fast and idiomatic client-driven REST APIs.

3306
94

The Symfony PHP framework

27486
8584

A browser testing and web crawling library for PHP and Symfony

2634
204

React ESI: Blazing-fast Server-Side Rendering for React and Next.js

624
27

Events

issue comment
Fix GH-8029: Restore previously registered signal handlers

I tried this patch to check if it fixes #9649 but unfortunately, it doesn't seem to be the case.

Created at 4 hours ago
reopened issue
opcache: symbol not found in flat namespace (_zend_gdb_register_code) when JIT enabled on Mac OS X

Description

When compiling PHP 8.2 on Mac OS X with the following configuration:

./configure --enable-embed=static --enable-zts --with-iconv=/opt/homebrew/opt/libiconv/ --enable-opcache

I get this error when loading the opcache.so extension:

Failed loading /usr/local/lib/php/extensions/no-debug-zts-20220829/opcache.so: dlopen(/usr/local/lib/php/extensions/no-debug-zts-20220829/opcache.so, 0x0009): symbol not found in flat namespace (_zend_gdb_register_code)

Disabling opcache JIT fixes the issue:

./configure --enable-embed=static --enable-zts --with-iconv=/opt/homebrew/opt/libiconv/ --enable-opcache --disable-opcache-jit

PHP Version

PHP 8.2-dev

Operating System

macOS 12.6

Created at 4 hours ago
fix: change script name because `yarn create` tries to run create-client and fail

Can you remove the package-lock.json file?

Otherwise 👍, good catch!!

Created at 16 hours ago

Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt

When running in CI it fails when path/address is longer 108

Merge branch 'PHP-8.0' into PHP-8.1

Merge branch 'PHP-8.1' into PHP-8.2

Return immediately when FD_SETSIZE is exceeded (#9602)

[ci skip] NEWS

Merge branch 'PHP-8.0' into PHP-8.1

  • PHP-8.0: [ci skip] NEWS Return immediately when FD_SETSIZE is exceeded (#9602)

[ci skip] NEWS

Merge branch 'PHP-8.1' into PHP-8.2

  • PHP-8.1: [ci skip] NEWS [ci skip] NEWS Return immediately when FD_SETSIZE is exceeded (#9602)

[ci skip] NEWS

Use --EXTENSIONS-- section for newly added tests

As of PHP 8.1.0, the `--EXTENSIONS-- section is properly supported, and CIs may make use of that (our AppVeyor CI does). Thus it is important to list required extensions there, since otherwise they may not be loaded, causing the test to be skipped, or worse, to be borked.

Merge branch 'PHP-8.1' into PHP-8.2

  • PHP-8.1: Use --EXTENSIONS-- section for newly added tests

gh9590.phpt requires ext/posix

Merge branch 'PHP-8.1' into PHP-8.2

  • PHP-8.1: gh9590.phpt requires ext/posix

Fix GH-9655: Allow pure intersection types to be implicitly nullable

Closes GH-9659

Fix abstract trace consisency for FE_FETCH instruction

Merge branch 'PHP-8.0' into PHP-8.1

  • PHP-8.0: Fix abstract trace consisency for FE_FETCH instruction

Merge branch 'PHP-8.1' into PHP-8.2

  • PHP-8.1: Fix abstract trace consisency for FE_FETCH instruction

Fix GH-9626: JIT type assertion failure in Symfony community build

Fix register allocation (missing store)

This fixes oss-fuzz #52022

Merge branch 'PHP-8.0' into PHP-8.1

  • PHP-8.0: Fix register allocation (missing store)
Created at 1 day ago

Set SA_ONSTACK in zend_sigaction

opcache: add FrankenPHP to the allow list

Created at 1 day ago
issue comment
opcache: symbol not found in flat namespace (_zend_gdb_register_code) when JIT enabled on Mac OS X

@devnexen this looks related but I'm not sure if that's precisely the same issue. Unlike #9635, I'm not loading PHP as a plugin for another app. PHP is statically compiled in the main Go binary:

+-------+-------+
|Go App               |
+---------------+
|     PHP       |
+--+---------+--+
   |         |dlopen/dlsym
+--+---+ +---+--+
| PHP  | | PHP  |
| ext1 | | ext2 |
+------+ +------+

Basically, the main app loads directly opcache.so.

Created at 1 day ago
create branch
dunglas create branch frankenphp-8.2-rebased
Created at 1 day ago
issue comment
opcache: symbol not found in flat namespace (_zend_gdb_register_code) when JIT enabled on Mac OS X

This issue is back again (macOS only). I probably made a mistake while recompiling hiding the issue. I can still give access to a reproducer.

Created at 1 day ago
issue comment
segmentation fault when sending SIGINT to PHP embedded in another program

Thank you very much for your help @arnaud-lb.

I confirm that disabling ZEND_SIGNAL fixes the issue both on Linux and Mac.

I also tried to mask all signals: https://gist.github.com/dunglas/278225a71ba3fc11a27ca8c1705fa0c8

This fixes the problem in your reproducer, unfortunately, it doesn't play very well with the Go embedding use case because it's not desirable (and probably not possible at all) to change the mask for threads started by Go itself.

Couldn't we detect it's a thread executing PHP before calling SIGG(active)?

Created at 1 day ago
issue comment
Update errors.md

Thanks!

Created at 3 days ago

Update errors.md (#1619)

Created at 3 days ago
pull request closed
Update errors.md
Created at 3 days ago
pull request opened
feat: compatiblity with Mac OS X

Fixes #55.

Created at 4 days ago

feat: compatiblity with Mac OS X

Created at 4 days ago
create branch
dunglas create branch feat/mac-os-compat
Created at 4 days ago
Created at 4 days ago
issue comment
fix: use !ChangeThisMercureHubJWTSecretKey! as default JWT secret key

Thanks!

Created at 4 days ago
closed issue
Mercure JWT key does not match symfony/mercure-bundle recipe

The (default) values of the environment variables MERCURE_JWT_SECRET, MERCURE_PUBLISHER_JWT_KEY, MERCURE_SUBSCRIBER_JWT_KEY do not match the values used in the symfony/mercure-bundle recipe, nor the values specified in the official Symfony documentation: https://github.com/symfony/recipes/blob/main/symfony/mercure-bundle/0.3/manifest.json https://github.com/symfony/symfony-docs/pull/17269/files

https://github.com/symfony/recipes/pull/1124

It seems we should use a secret key whose value matches the requirements of lcobucci/jwt ^4.2 to prevent this error: https://github.com/symfony/mercure/issues/89 https://github.com/lcobucci/jwt/issues/890

Created at 4 days ago

fix: use !ChangeThisMercureHubJWTSecretKey! as default JWT secret key (#295)

Created at 4 days ago
pull request closed
fix: use !ChangeThisMercureHubJWTSecretKey! as default JWT secret key

Fixes #294

Created at 4 days ago
opened issue
segmentation fault when sending SIGINT to PHP embedded in another program

Description

I'm embedding PHP in a Go program. When this program receives SIGINT, PHP crashes with the following stack trace (extracted using GDB):

Thread 1 "internal" received signal SIGSEGV, Segmentation fault.
0x00000000007b907c in zend_signal_handler_defer (signo=2, siginfo=0xffffeb3e5600, context=0xffffeb3e5680) at /go/php-src/Zend/zend_signal.c:98
98              if (EXPECTED(SIGG(active))) {

This may be related to #8029, #8789, #9337.

If anyone has an idea of what's happening, I can give them access to a private repository with a simple way to reproduce the crash. I reproduced the issue on Debian and macOS.

Go documentation about signal handling and C code: https://pkg.go.dev/os/signal#hdr-Go_programs_that_use_cgo_or_SWIG

PHP Version

PHP 8.2-dev

Operating System

Debian, macOS

Created at 4 days ago
closed issue
opcache: symbol not found in flat namespace (_zend_gdb_register_code) when JIT enabled on Mac OS X

Description

When compiling PHP 8.2 on Mac OS X with the following configuration:

./configure --enable-embed=static --enable-zts --with-iconv=/opt/homebrew/opt/libiconv/ --enable-opcache

I get this error when loading the opcache.so extension:

Failed loading /usr/local/lib/php/extensions/no-debug-zts-20220829/opcache.so: dlopen(/usr/local/lib/php/extensions/no-debug-zts-20220829/opcache.so, 0x0009): symbol not found in flat namespace (_zend_gdb_register_code)

Disabling opcache JIT fixes the issue:

./configure --enable-embed=static --enable-zts --with-iconv=/opt/homebrew/opt/libiconv/ --enable-opcache --disable-opcache-jit

PHP Version

PHP 8.2-dev

Operating System

macOS 12.6

Created at 4 days ago
issue comment
opcache: symbol not found in flat namespace (_zend_gdb_register_code) when JIT enabled on Mac OS X

I upgraded to the latest commit of the PHP-8.2 branch, recompiled with the exact same flags... and the issue is gone.

Thanks for your help everybody!

Created at 4 days ago
create branch
dunglas create branch frankenphp-8.2
Created at 4 days ago