Comments (5)
@haszi do you maybe have an idea about this?
from php-src.
No idea as this doesn't seem to be output buffering related. If I understand the above correctly what is being asked here is whether zend_get_executed_filename()
can retrieve the current filename during shutdown but as is also mentioned, EG(current_execute_data)
is set to NULL. This is the source code and the comment that goes with it:
Lines 1829 to 1832 in bb6e611
from php-src.
Thank you. When the shutdown phase occurs and the output handler (in this case, 'system') is executed, it triggers zend_call_function. The issue arises because the current execution context is set to NULL, resulting in the absence of the previous execution context when the system or output handler callback command is executed.
zend_get_executed_filename navigates through the context stack to locate the type of user-defined function in order to retrieve the filename. Without previous context, it's not able to derive filename.
from php-src.
The description of your issue and your question under Expected behavior
seem like two different issue to me, but to comment on the first, passing system()
to ob_start()
will result in a warning as the second argument ob_start()
passes to system()
is not passed by reference so results in this warning:
PHP Warning: system(): Argument #2 ($result_code) must be passed by reference
I cannot comment on your question other than that the comment in the source code suggests that that is currently not possible.
from php-src.
The problem isn't with the 'system' function, but with 'ob_flush'. Let's say I use a custom function from my extension that tries to read zend_get_executed_filename(). It doesn't get the right context when flush occurs during the shutdown phase.
from php-src.
Related Issues (20)
- FPM Status: active processes greater than pm.max_children HOT 1
- Cannot use FFI::load on CRLF header file with apache2handler HOT 2
- Slow loading php-fpm configuration HOT 1
- mb_detect_encoding difference between PHP 8.1.28 and 8.3.6 HOT 3
- Error OpenSSL Shutdown while in init - cURL - MSSQL HOT 1
- php-8.1.27 php_module fails to load with Apache 2.4.58 on Solaris-SPARC 5.11
- PHP version 8.3.7 compiles and tests on the curl 7.76.1 extension and reports an error HOT 2
- Is there a development tutorial for expanding the library? HOT 2
- Using `--enable-fuzzer` with `--enable-zts` cause compilation to fail HOT 2
- pdo_pgsql: question marks seen as parameter placeholders in dollar-quoted string HOT 2
- Weird behaviour for DNS resolution HOT 1
- mysqli_fetch_assoc reports error from nested query HOT 1
- Implement ED25519 auth for mysqlnd HOT 3
- PHP 8.2.19: segfault at 7f377e872428 (sp 00007ffcd580fec0 error 4) HOT 32
- opcache.jit=off does not behave as documented
- Has PHP added support for generics, similar to Java's generics HOT 5
- Can't cross-compile with external libcrypt HOT 1
- ffi enum type (when enum has no name) make memory leak HOT 2
- Can the final PHP code be compiled into binary and run on the server, which is more secure on the server side and less likely to cause code intrusion? Currently, the traditional deployment method is through source code, which is easily exposed and tampered with. We deploy more security. Java like jar packages are not even more secure. HOT 1
- Member access within null pointer in extension spl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-src.