Comments (8)
Interesting! Can you please share the Phar archive and it's source code that you're using, as well as how to execute it (I assume it's a CLI application). Thx
from phar-stream-wrapper.
stream_select
seems to be related to #8 (which could not be verified, yet)
from phar-stream-wrapper.
Sure. That‘s my composer scripts packing the phar archive:
"scripts": {
"extension-create-libs": [
"mkdir -p Libraries/temp Libraries/build",
"if [ ! -f Libraries/build/vendor/bin/phar-composer ]; then cd Libraries/build && composer require clue/phar-composer; fi",
"if [ ! -f Libraries/php-iban.phar ]; then cd Libraries/temp && composer require globalcitizen/php-iban && composer config classmap-authoritative true && composer config prepend-autoloader false && composer dump-autoload; fi",
"[ -f Libraries/php-iban.phar ] || Libraries/build/vendor/bin/phar-composer build Libraries/temp/ Libraries/php-iban.phar",
"chmod -x Libraries/*.phar",
"rm -rf Libraries/temp Libraries/build"
],
"extension-build": [
"@extension-create-libs"
],
"extension-clean": [
"rm -rf Libraries"
]
}
It‘s not strictly a CLI application but a TYPO3 eID script call. I attached the phar for reference.
See the phar source code here: https://github.com/globalcitizen/php-iban
from phar-stream-wrapper.
I could not reproduce using include('phar://php-iban.phar/vendor/autoload.php');
. The initial report mentioned symfony-process.phar
, could you please attach that file as well in case you've just shared the wrong bundle?
My isolated test scenario just looked like this:
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
call_user_func(function () {
\TYPO3\PharStreamWrapper\Manager::initialize(
(new \TYPO3\PharStreamWrapper\Behavior())
->withAssertion(new \TYPO3\PharStreamWrapper\Interceptor\PharExtensionInterceptor())
);
if (in_array('phar', stream_get_wrappers())) {
stream_wrapper_unregister('phar');
stream_wrapper_register('phar', \TYPO3\PharStreamWrapper\PharStreamWrapper::class);
}
include('phar://php-iban.pharx/vendor/autoload.php');
});
from phar-stream-wrapper.
I just got a similar report in pagemachine/typo3-formlog#23 apparently affecting stream_open
. Any idea what I can do?
from phar-stream-wrapper.
@mbrodala stream_open
seems to be unrelated to this issue here... Reading the issue you referenced it's for sure the interceptor (https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/IO/PharStreamWrapperInterceptor.php#L50-L59) that blocks the request. I guess(!) it might be related to PATH_site
and using a couple of symbolic links there...
from phar-stream-wrapper.
The issue mentioned in pagemachine/typo3-formlog#23 was a different one.
Back to this very issue, invocation of stream_select
within the wrapper is still a mystery. Looking forward to a locally reproducible scenario (Docker, DDEV, Vagrant, ...)
from phar-stream-wrapper.
There haven't been much more details on this topic during the last two years. I guess it's fine to close this issue.
from phar-stream-wrapper.
Related Issues (20)
- Interceptors fail using Phar archives using internal aliases
- Monitor Drupal reports
- Publish new v2.1.0 & v3.1.0 releases
- Breaking included AWS Phar HOT 8
- Performance down between 0469d9f and b7a21f0 HOT 9
- Manifest / End of Stub Detection
- Enhance variety of test fixtures
- Normalize resolved Windows path to Unix-style
- Deprecate unused constant in PharInvocationResolver
- Connect up appveyor HOT 1
- Alias resolving on included Phar files fails
- Extend invocation test cases HOT 1
- Breaks typo3 8.7.25 on symlinked webroot HOT 5
- Ensure PHP 7.4 compatibility HOT 6
- Check meta-data deserialization capabilities in PHP 8 HOT 3
- PHP Notice: stream_wrapper_restore(): phar:// was never changed HOT 1
- Does not handle fgets returning an error gracefully HOT 6
- Version 2.2.2 not backwards compatible because of strict_types=1 HOT 1
- Add possibility to retrieve low-level Phar internals
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 phar-stream-wrapper.