Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Problem/Motivation
There seem to be some ongoing issues as a result of this release and it would be really helpful to have a stronger sense of why they are happening. So far it's just "seems to happen for some people, but not others."
Drupal 8.6.6/8.5.9/7.62 sites still trying to update to 8.6.7/8.5.10/7.63
If you updated to 7.62, 8.5.9., or 8.6.6 using Drush, received errors, and then ran into difficulty getting the site updated to the hotfix releases (which some users have reported), try using the manual update instructions to get your site onto a version of Drupal that better supports Drush: 8.6.7, 8.5.10, or 7.63
Sites updated to 8.6.7, 8.5.10, or 7.63
If you have upgraded to 8.6.7, 8.5.10, or 7.63 and are still affected by the Fatal error: Uncaught TYPO3\PharStreamWrapper\Exception when running Drush commands, can you do a few things. First:
- Ensure the site has been fully updated to the hotfix release by running
update.phpand then checking the version on the stats report. If you installed the security releases first, you may see the errors when updating to the newer releases, but it might be fixed afterward. - Test Drush again after you've verified the site is on one of 8.6.7, 8.5.10, or 7.63.
- If you get errors mentioning
cache_get(), double-check that the new libraries at http://cgit.drupalcode.org/drupal/tree/misc/typo3?h=7.x were correctly deployed to your server.
Then, try some of the following:
- Try upgrading Drush to the most recent version of Drush 8. Drush 8.1.18 reportedly has a fix that helps resolve the issue.
- Try renaming the
drushCLI command file back todrush.pharand create a symlink fordrushto that file, i.e.:
mv drush drush.phar ; ln -s drush.phar drush - Attempt your calls using
drush.pharinstead ofdrush. - Run
drush cc drushoutside of a drupal site root after your code is upgraded. Links to drush paths are found in drush cache. - If you can, install Drush with Composer/upgrade Drush to version 9. (This is more involved as some Drush commands have changed and some have been removed, but it's also likely to completely fix the problem).
- Try replicating the problem with the same codebase/database in different environments - e.g. does it work locally but fail on your hosting provider? Or vice-versa?
- Try replicating the problem with a brand new codebase/database install in the same environment. Does that still cause the problem?
- Take note of the directory paths where Drush and Drupal are installed. Are there symlinks? Is Drupal installed in a subdirectory? Etc.
If you can report with details of where you were before/after and what worked/didn't - that will all be enormously helpful.
Proposed resolution
TBD; we need to determine the exact source of the problem.
Remaining tasks
Needs further triage.
User interface changes
N/A
API changes
TBD
Data model changes
N/A
Release notes snippet
TBD
Original report
Porting from https://www.drupal.org/project/drupal/issues/3026386#comment-12929709
Upgraded to drupal 7.63 and still have this issue. Note in the uploaded screeny I tried drush up drupal for kicks but I already had 7.63 in the repository... Doesn't happen on all my sites on this server using the same drush setup... just this one...

the drush command on this server is an alias to a script that calls the drush.phar. Adding a symlink and calling that via the script does nothing for us. example
which drush
alias drush='sudo -u apache /usr/local/bin/scldrush'
/bin/sudoscldrush looks like
#!/bin/bash
. /opt/rh/rh-php56/enable
/usr/local/bin/drush "$@"Where /usr/local/bin/drush is the phar version of drush....
Even following step 3 didn't seem to work here...
What did work was pulling out a composer version of drush... but now I got to get the server admins to get that out there so that cron and the like is using it.
I'm concerned that the way we are looking through the backtrace isn't fool proof. We may want to explore to see if this also allows other phars to slip under the radar is they are good enough to imploy the work around using symlinks?
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3026560-d7-20.patch | 670 bytes | alexpott |











Comments
Comment #2
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedComment #3
bartvig CreditAttribution: bartvig commentedDid you do an actual symlink to a file called
drush.phar?When I do the following (when standing in the folder where drush is installed):
mv drush drush.phar ; ln -s drush.phar drushthen it works.
From your code above it doesn't look like your drush command is actually called
drush.pharComment #4
HitbyNot the OP but I did exactly that
mv drush drush.phar ; ln -s drush.phar drushand it's broken for me still.
Comment #5
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedYeah we did... just didnt take a screenshot of it.
Comment #6
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedComment #7
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedTotally ripping off @greggles
👆 Will see what I can do but adding for others.
Comment #8
DamienMcKennaComment #9
HitbyI have drush installed via composer on my local machine, that updated a duplicate of a site on the test server fine with no errors. The drush on the server is in /usr/local/bin/drush and is version 8.0.3 - I don't have permission to update it but I've put in a request to have it removed and replaced with a global composer version.
I've no idea how long that will take though.
hth
Dan
Comment #10
xjmUpdating the IS with @greggles' instructions plus some other debugging questions.
Comment #11
xjmComment #12
Alex Monaghan CreditAttribution: Alex Monaghan as a volunteer commentedSome background, hope this helps
Updated from 7.6.1
I have 2 servers, both cPanel on CentOS running Apache with PHP 5.6 & 7.2, seems to be 5.6 on command line.
Server 1 ran OK
Server 2 gave drush error on both a Drupal 6.49 LTS update and a 7.6.3 update
simply used "drush rf" followed by "drush up" as I've done for years
Was an older drush on server2 so updated to 8.1.18, but no change. Server 1 was 8.1.16
Have linked /usr/local/bin/drush to drush.phar as suggested but no change.
Comment #13
alexpottI've filed an upstream PR that should fix this... https://github.com/TYPO3/phar-stream-wrapper/pull/8
Comment #14
alexpottIf someone could test it somehow and let me know because I don't know how to recreate the bug but the current phar security stream wrapper implementation just doesn't support stream_select() when as far as I know there's no reason it can't.
Comment #15
xjmIt'd probably be helpful for folks' testing to provide a patch they can test against the codebase (especially for D7).
Comment #16
alexpottGood idea. Here's a D7 patch.
Comment #17
HitbyI've used the patch in #16 and it installed cleanly. All drush commands now just give the message
Segmentation faultThanks,
Comment #18
Alex Monaghan CreditAttribution: Alex Monaghan as a volunteer commentedPatch gives "Bus error"
PHP 5.6.39
Comment #19
kevinquillen CreditAttribution: kevinquillen at Velir commentedPatch had no effect for me.
My error stems from this exception thrown here:
The drush on this server was installed in an older way, wget the drush phar file, mv drush.phar to drush....
If I dump the path here in this method, this is the output:
PHP info:
Running on a Lando stack.
Comment #20
alexpottSorry - trying things in the dark here as I can't reproduce the error locally. Been looking at other stream wrapper implementations #16 was based on one in core. Here's an idea from looking at other ones on packagist.
Comment #21
HitbyReversed patch from #16 and ran
patch < 3026560-d7-20.patch
patching file PharStreamWrapper.php
drush cc all gave me
Appreciate your help with this Alex
Comment #22
kevinquillen CreditAttribution: kevinquillen at Velir commentedSame error as #21.
Comment #23
doostinharrell CreditAttribution: doostinharrell commentedUpgrading to the latest version of Drush 8 for a clients Drupal 7 website resolved the issue for me.
Comment #24
xjmCleaning up the IS a bit.
Comment #25
xjmComment #26
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedOk I'm going out on a limb here and want to ask (and this may be another issue), but we are not allowing ANY phars to run in the drupal codebase?
Just had a client using pmp-php-sdk with a version of guzzle as a phar and they are receiving
Thoughts? This is after upgrading to 7.63 versus 7.62
Comment #27
alexpottAs far as I can see the only time stream_select() is used in drush 8 is when invoking some thing on a remote server. Here's a list of things that would be handy to know in order to reproduce the problem.
Full drush command being run:
Local Drupal version:
Local Drush version:
Local PHP version:
(if a remote is being used)
Remote Drupal version:
Remote Drush version:
Remote PHP version:
Anything special in your drush configuration:
For me I've tried the following but it work successfully.
Full drush command being run: ./drush8 @example.drops-7-on-72.dev cc all
Local Drupal version: 7.64-dev
Local Drush version: 8.0.2
Local PHP version: 7.0.33
(if a remote is being used)
Remote Drupal version: 7.61
Remote Drush version: 8.1.18
Remote PHP version: 7.2.14
Anything special in your drush configuration: ./drush8 is a renamed drush phar file.
Comment #28
kevinquillen CreditAttribution: kevinquillen at Velir commentedFor now I had to:
in
docroot/misc/typo3/drupal-security/PharExtensionInterceptor.php. Then I was able to use drush (have a client project and needed to update core and about 55 contrib modules). Other than that, nothing I have done was working for Drush (even upgraded to latest 8.x stable release as someone else mentioned working).After getting everything updated I reverted PharExtensionInterceptor.php back.
Comment #29
alexpott@generalredneck we are but from the look of that stacktrace the guzzle phar is using aliases or box - that issue is being tracked in #3026443: \Drupal\Core\Security\PharExtensionInterceptor is incompatible with GeoIP and other libraries that use phar aliases or Phar::mapPhar()
Comment #30
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@alexpott, Thanks tons, I'll send that their way... I'm getting some time to work with yall on this now that all the fires have calmed down... I'll give some hopefully useful info soon on reproduction.
Comment #31
HitbyKevin, That fixes drush for me to but presumably removes the phar protection.
For what it's worth my versions are
Remote Drupal version: 7.63
Remote Drush version: 8.0.3
Remote PHP version: 5.6.39
Comment #32
kevinquillen CreditAttribution: kevinquillen at Velir commentedDid a little debugging after the fact.
Dumping
$fileExtensionhere on a drush call produces an empty string.$baseFileis/usr/local/bin/drushand$pathisphar:///usr/local/bin/drush/commands/core/drupalComment #33
alexpott@kevinquillen thanks for the info. I thought that 7.63 would have fixed this. Can you confirm you have applied http://cgit.drupalcode.org/drupal/commit/?h=7.x&id=7f1f3b8be02f6f3af5934... - also if you can it would great to know the value of
$caller['file']- just before it doesreturn strtolower($fileExtension) === 'phar';Comment #34
kevinquillen CreditAttribution: kevinquillen at Velir commented$caller['file']producesdocroot/includes/bootstrap.inc. I do have the linked patch, just as a straight upgrade from 7.60 to 7.63 viadrush up drupal.#31 yep, I did this to unblock me to get the work through the pipeline. I reverted the file back.
Comment #35
kevinquillen CreditAttribution: kevinquillen at Velir commentedOutput of the last `updb` command:
Comment #36
littlepixiez CreditAttribution: littlepixiez as a volunteer and commentedNot sure if this is helpful, but on my shared hosting, if I switch PHP version down and run "drush cc all" I get:
Locally it's all fine using Docksal:
Drupal version: 7.63
Drush version: 8.1.16
PHP version: 7.1.18
Errors in this environment:
Remote Drupal version: 7.63
Remote Drush version: 8.1.3
Remote PHP version: PHP 5.6.39
But if I switch the PHP version to 7.0.33 or above on shared hosting it resolves the issue. Cannot reproduce locally.
Update: Just to confirm the same happens for a blank install.
Comment #37
pbirk CreditAttribution: pbirk commentedNot sure if this is helpful. I'm able to work around this issue on my environment, but I was able to reproduce the error yesterday.
I started with a fresh Drupal installation on my dev environment:
Drupal 7.63
drush 8.1.7 (global install at
/usr/local/bin)PHP 7.0.32-0ubuntu0.16.04.1
I used a drush symbolic link to drush.phar like others have described:
I ran
drush cc allto generate the error. Then I used the patch from #20, randrush cc allagain with the same results.Next, I upgraded to drush 8.1.18 and installed it in the same manner. I ran
drush cc allwithout error. I reverted the patch, randrush cc allagain without error.Now it gets weird. I reverted back to drush 8.1.7 and attempted
drush cc allagain. No error.I attached a log of the relevant shell output.
Comment #38
pbirk CreditAttribution: pbirk commentedI took a closer look and realized I accidentally converted the symbolic link to a file with my copy command to restore drush 8.1.7. I removed
/usr/local/bin/drushthen recreated the link withln -s drush.phar drushand now reproduce the error as expected.Comment #39
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedThis may be helpful in my instance...

Looks like however the drush script was created was using https://github.com/box-project/box2-lib which is why the work around here wouldn't work.
Comment #40
alexpott@generalredneck yep and box created phars are being discussed on #3026443: \Drupal\Core\Security\PharExtensionInterceptor is incompatible with GeoIP and other libraries that use phar aliases or Phar::mapPhar()
Comment #41
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedAdding a bit of information...
so /usr/local/bin/drush IS a symlink to /usr/local/bin/drush.phar above... It just so happens that it's not the same far that's distributed over at github...
See below
and to get some idea of the variables in memory when this fails for me currently it's just what's below in the assert function on line 38 in misc/typo3/drupal-security/PharExtensionInterceptor.php
Comment #42
alexpott@generalredneck I think it is the same phar - drush 8 was built using box too - its a common tool for building phars. But something in that setup means it doesn't work. Have you tried running
/usr/local/bin/drush.phardirectly instead?Comment #43
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@alexpott,
Interesting... so here are my findings... First I want to preface this with we have to run compiled version of PHP 5.6 because this version of RH has 5.4 as default... so here's what I did based on the information I sent you before
Ok so far so good... I rename the thing to "drush" so that I can use it via the alias that the server admins use so that file permissions happen correctly... keep in mind that the file I'm moving is the phar.
Ok so far so good... I got drush status going again... but then I'm stuck back with this only happening in drush cc all. Note I have a
var_dump(get_defined_vars());@ line 38 in misc/typo3/drupal-security/PharExtensionInterceptor.phpIt sounds like to me if we change the alias to call drush.phar and rename drush to drush.phar we will be in business... I just don't understand "why"
Comment #44
alexpott@generalredneck Well the logic of the PharInterceptor is such that if a file ends in .phar it thinks it is safe - it that works for you then great!
Comment #45
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedNope... No bueno
What I don't understand is where it's getting /usr/local/bin/drush as a path, as /usr/local/bin/drush doesn't exist.
Comment #46
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedOk... so... making the changes above actually DID work... I had to switch out of the site directory... run
drush cc drushand THEN come back in and do adrush cc all. I suspect adrush @none cc drushprobably would have worked too.Comment #47
b.khouy CreditAttribution: b.khouy commentedThis issue has been produced on remote server for me with the following infos:
The problem was fixed by downgrading Drush to 7.1.0
Update:
No patch has been applied
Comment #48
HitbyHaving updated drush to 8.1.18 I now get the following error on sites I've updated to 7.63 for all commands
debug_backtrace below
edit: on updating an older D8 site using drush - 8.6.2 - 8.6.7
Comment #49
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedAdded 2 steps to attempt help people work around this.
Everyone has to make sure they are calling drush.phar... either specifically or via a symlink.
Then you must clear your drush cache after your code has been upgraded to 7.63 or 8.6.7 while NOT in the site directory or removing the
~/.drush/cachefolder.The problem is for some reason the calls to the old filename of "drush" and not "drush.phar" are hanging around.
We need to look into if APC or alternative site caching backend like memcache or reddits may cause a similar issue.
Comment #50
HitbyUnfortunately it makes no difference to me
root@ [/usr/local/bin]# mv drush drush.phar
root@ [/usr/local/bin]# ln -s drush.phar drush
root@ [/usr/local/bin]# drush cc drush
re-clear the drush cache in ~/
cd www
drush cc all
backtrace
drush cc all
Comment #51
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedQuestion...
Is there any reason we dont check to see if the file actually exists in https://cgit.drupalcode.org/drupal/tree/misc/typo3/drupal-security/PharE...
May be a stupid one... or maybe the filename needs to be expanded before checked?
in the cache issue with drush... if your server doesnt have php set up to follow symlinks... this may be an issue?
Comment #52
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@hitby
Try calling drush.phar instead of the symlink and doing the steps. I notice in your stack its calling
phar:///usr/local/bin/drushwhich is setting it off because drush doesn't have the .phar extension.If that doesnt work I suspect the call is cached elsewhere like the database or memcache so we may have to resort to clearing that cache manually before we get the effect. Also... you ARE getting a slightly different error from some of us. So we need to explore a bit.
Comment #53
HitbyThanks for your help on this. renaming drush to drush.phar, clearing caches and repeating a cc all
Comment #54
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@hitby,
Does this go away when you downgrade back to 7.61 or do you still get an error in cache_get. the cache_get error can ALSO be caused by a syntax error in your any of your settings.php files.
Try running
php -lon each of your settings files. ExampleYou will have to do this one at a time as I don't THINK -l allows wildcards. You might be able to do something fancy like
Comment #55
HitbyThanks,
Will an issue in a settings file from a separate Drupal install affect all?
fwiw, drush works fine on any D7.X before 7.63
as soon as I update a codebase to 7.63 drush fails.
php -l on the ones I have already updated say no syntax errors detected. I'll need to file a support request to have drush downgraded although I have one pending already for a composer version.
Cheers
Comment #56
generalredneck CreditAttribution: generalredneck at Four Kitchens commentednaw, just on the site you are running the command on. You would notice when you try running the site too cause you would get the same cache_get error.
Ok cool, so we know for a fact that it only happens with 7.63... that's what I wanted to verify... The only other thing I would say that we haven't tried yet is clearing your site's cache manually (without drush). if we could for a fact clear all the caches (including memcache, database cache, redis, opcache and APC depending on the version of php you are on) and then go through our process above... I would feel a bunch better.
I don't suppose you have tried to run cache_clear using the website itself have you? like using the button on admin -> config -> development and seeing if it has a similar issue? I want to see if this is limited to using drush.
After that I don't know where to go and someone else may have to get a fresh set of eyes on your site's symptoms.
Comment #57
Alex Monaghan CreditAttribution: Alex Monaghan as a volunteer commentedMost odd, given the mention of cache, I went back to my failed sites and 2 D7 and the D6 site ran drush up OK, the 3rd D7 ran it OK after doing a drush cc drush.
I changed PHP from 5 to 7 (overdue anyway!) yesterday evening but that didn't fix the drush issue.
Comment #58
kevinquillen CreditAttribution: kevinquillen at Velir commentedMy problem is gone. Here is what I did after getting some rest.
Docker container:
Host machine:
lando drush @mysite.local updbNo error. Also no subsequent error on uli, cc all, up (project). I still have the patch from #16 applied.
I suppose the rename of drush to drush.phar and forcibly removing the cache folder was key. Although, how would this address other packages like GeoIP or Guzzle that have been reported?
I will reiterate that this is an older project that does not have or use Composer, and Drush (8.x) is installed globally in the Docker container and not to the project.
Comment #59
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedYeah I had the TYPO3 error just hit me on a lando machine... After running
drush @none cc drushfrom inside the machine... all was well...Comment #60
HitbyA little further information after working through it with @alexpott
A drush cc all --debug gives
Comment #61
kevinquillen CreditAttribution: kevinquillen at Velir commentedAfter the change, putting the debugging back in place from #32,
$fileExtensionnow has 'phar'.Comment #62
HitbyI've replaced drush with a composer installed version which is working as expected.
Comment #63
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedComment #64
luf CreditAttribution: luf commentedThis same error occurred on a site running 7.62 with no Drush in the environment, upgraded to 7.63 at this time to see if it makes a difference, however it may be good to note.
[edit] After updating to 7.63 within 24 hours the same error occurred. Again, this installation and server does not have Drush in the environment at all.
Comment #65
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedBeing more specific on what we upgraded to since 7.63 was removed from the title earlier. THis way that people that are just pulling in the security fix will know to upgrade to the newer hotfixed version.
Comment #66
possiBriSwitching to Drush 8.1.18 (using Lando, updated .lando.yml and then rebuilt site) and then following the steps to clear Drush (I used the @none method) in #46 has worked for me as well. I can now drush cc all without error. Thanks!
Comment #67
xjmAdding help text to the IS for site users who are struggling to get updated to 7.63 et. al
Comment #68
xjmAdding more about the Drush update, since this seems to be solving the problem for a lot of sites.
Comment #69
xjm@Hitby, I saw earlier that some folks with a
cache_get()error when the newTYPO3library folder hadn't been completely deployed to the server. Can you check that all the files are there in http://cgit.drupalcode.org/drupal/tree/misc/typo3?h=7.x ?Edit: I see you are having success now with a Composer install. I'll add the example to the IS.
Comment #70
xjmComment #71
xjmComment #72
xjmComment #73
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedso something that has been consistant with every deploy so far in my clients is making sure are using drush.phar (either a symlink TO it, or drush.phar itself) and the need to clear out drush's cache using drush @none cc drush... Something is being cached over in ~/.drush/cache that is contributing to this.
Comment #74
Hitby@xjm, yep, all the files had deployed correctly. emptying ~/.drush/cache didn't help me unfortunately.
Comment #75
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedSo @greg.1.anderson, @alexpott and myself got together and worked through some stuff. This doesn't highlight @Hitby's case, but it does highlight my usecase. We will have to investigate to see if we can find the cause for Hitby's case.
As for my error, here's how you reproduce it. I'm using lando because it was easy for me... but you can use any site setup to do this
The output I get here is
A copy of the debug data is attached as output.txt
This led me to find the cache file that contains references to the phar which looks like this in
~/.drush/cache/default/ 8.1.9-commandfiles-5-d097766d5aa5d9522510e16a657204b9.cache2 things I can think of in reguards to this...
drush cc drushis an acceptable fix to this, case closed after work arounds.phar:\/\/\/app\/drushbecomesphar:\/\/\/app\/drush.pharHope this helps.
Comment #77
xjmGreat research! Thanks so much for documenting all those steps.
(Updating issue credit.)
Comment #78
blairwigley CreditAttribution: blairwigley as a volunteer commentedI was getting this issue with a wget installed version of Drush 8.1.17. Removing it and installing Drush 8.1.18 via composer solved the issue for me.
Comment #79
sridarm CreditAttribution: sridarm commentedI tried "composer update update drupal/core --with-dependencies" which solved the issues for me in d8
Comment #80
luf CreditAttribution: luf commentedIssue persists: PHP Fatal Error TYPO3\PharStreamWrapper\Manager not found file.phar.inc on line 27
Drupal 7.63 with no Drush or Composer installed in the environment. This may require its own issue as none of the fixes here will resolve for this system.
Comment #81
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@luf
That's a new one... Sounds like something different. Do you by chance have a full stack trace or steps on how to reproduce?
Comment #82
luf CreditAttribution: luf commented@generalredneck
I do not, have been looking through logs to try and find what is causing this issue and cannot find any requests or errors that could trigger this event. Environment is IIS 8.5, PHP 5.6.4 (non thread safe).
'Class 'TYPO3\PharStreamWrapper\Manager' not found' suggests it is unable to use the assigned variable: 'use TYPO3\PharStreamWrapper\Manager as PharStreamWrapperManager;' on line 4 or is somehow ignoring the assignment.
Comment #83
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedInteresting... that actually sounds like you may be missing some files. You might check that the following files in https://www.drupal.org/commitlog/commit/2/3d3ff82cee9d80ef5fc1647fbd2096... are there... use doesn't assign variables, but it does tell the script to "use" a fully qualified class name as an aliase... so in this case TYPO3\PharStreamWrapper\Manager is aliased as PharStreamWrapperManager. Since all of the TYPO3 stuff declares a namespace this works. All the files within the TYPO3 folder are also included in includes/file.phar.inc as you can see here https://cgit.drupalcode.org/drupal/commit/?id=a4455a1628111df7127c73e0a2...
So given that... that should be found...
An easy way to test would be to redownload 7.63 again and drop at least the misc and include directories over what you have installed.
Comment #84
luf CreditAttribution: luf commentedAppreciate the fast response, all of the files did show up and I have updated to 7.63 again to see if this resolves the issue. Will update again if it continues to occur.
Comment #85
sokru CreditAttribution: sokru as a volunteer commentedI got the same error message with Drush 9.4.0 + 8.6.7, using DDEV. Visiting update.php revealed that I had accidentally removed one contrib module (realistic_dummy_content) from local file system, putting back the contrib module fixed the issue.
Comment #86
romanow CreditAttribution: romanow commentedManual Upgrade from 8.6.4 to 8.6.7. Only copy the zip content as I've always done, and I get the error "The website encountered an unexpected error. Please try again later."
I couldn't execute update.php, it showed the same error "The website encountered an unexpected error. Please try again later."
I'm sorry about my English.
Comment #87
DrPal43 CreditAttribution: DrPal43 as a volunteer commentedI updated from 8.6.2 to 8.6.7 and got this error. It was fixed after this git commands.
composer update drupal/core --with-dependencies
git add --all
git commit -m "Drupal core 8.6.7"
git push
Some of the files are not being added to the commit and you need to use git add --all.
Hopefully this helps out some people.
Comment #88
cilefen CreditAttribution: cilefen at Institute for Advanced Study commented@romanow Something will be logged by the web server. You must look there.
Comment #89
loopy1492 CreditAttribution: loopy1492 commentedI'm not sure if this helps, but on our Drupal 8 site, this is what kept me from simply running Composer Update at first"
Could not scan for classes inside "/var/www/docroot/vendor/phayes/geophp/geoPHP.inc" which does not appear to be a file nor a folderSo I deleted composer.lock and vendor folders, then ran composer install and that's what has led me down this path.
Comment #90
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@loopy1492. #3026443: \Drupal\Core\Security\PharExtensionInterceptor is incompatible with GeoIP and other libraries that use phar aliases or Phar::mapPhar()
Maybe that was what you were encoutering? I'm probably not understanding
Comment #91
loopy1492 CreditAttribution: loopy1492 commentedThat's the error, @generalredneck but composer install seemed to quiet the issue.
So, after updating to 8.6.7, I am no longer getting a phar error, but now I'm getting the following when I load up the site:
Drush runs fine, but the site doesn't render due to the above error. I'll try to see if there's a separate issue for it.
Comment #92
loopy1492 CreditAttribution: loopy1492 commentedOkay. I rebased my repo back to before the update. Then, I changed the drupal version from 8.6.3 to 8.6.7. Our vendor had bootstrap set to "^3.16". I changed it to just "3.16" because I think there's a stable dev version out there that might have been downloaded.
Neither error occurs now and the site works fine. Thanks for all your work on this issue.
Comment #93
jonhattanComment #94
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedComment #95
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedComment #96
zlatev CreditAttribution: zlatev commentedI just found out an interesting dependancy. We have multiple projects running on both 7 and 8 and even after all tips here one of the 7.63 projects still fired up the error. We had a memcache service up and running - after taking out the memcache of the equation everything is fine so my guess is that something goes wrong there. I hope to be able to make a deeper research soon. I tested locally and even with "fresh" cache the problem is still reproducible.
Comment #97
tormiRe: #96
I confirm that the problem was resolved after removing memcached from my local Lando environment.
Comment #98
kiddynomite CreditAttribution: kiddynomite commentedI upgraded Drupal to 7.6.3 using Drush 8.1.15 locally and it worked fine (drush up). It works great on my local copy (MAMP) but when I deploy it to AWS every page returns 'Not Found' with this error in the httpd logs:
Not certain if it's related, but thought I'd pass it along. I haven't found a fix yet either.
Comment #99
ykarthikvarma CreditAttribution: ykarthikvarma as a volunteer commented@kiddynomite Try updating the PHP libraries "vendor" using composer which fixed a similar issue for me.
composer update drupal/core --with-dependenciesComment #100
effulgentsia CreditAttribution: effulgentsia at Acquia commented#99 is a good tip for Drupal 8, but #98's report is for Drupal 7.
Comment #101
WillGFP CreditAttribution: WillGFP commentedI had this error with 7.62, tried a few things but only a manual update to 7.63 fixed things.
Comment #102
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@WIllGFP
What you experienced was the reason there is a 7.63. #3026386: Drush fatal error after upgrading to 8.6.6, 8.5.9, or 7.62: PHP Fatal error: Uncaught TYPO3\PharStreamWrapper\Exception
Comment #103
awoodley CreditAttribution: awoodley as a volunteer commentedI have several 7.6.3 Drupal installs and I found if you commit the "misc/type3" with 7.6.3 is works fine. The problem is to do with the phar-stream-wrapper/ missing. - From my point of view. cheers
Comment #104
xjmIt sounds like several folks are running into trouble with the library not being included/found due to issues with deployment or a stale cache of some sort (memcached, opcode, etc.). Adding a note about that to the suggestions in the IS.
Comment #105
kevinquillen CreditAttribution: kevinquillen at Velir commentedUpdate here - I just updated a project from 7.60 to 7.63 that was in Docker Compose setup (but NOT a Lando project) that worked fine and did not have the same issue I had earlier in the thread.
Comment #106
chowdah CreditAttribution: chowdah commentedI stumbled across this thread after trying an upgrade from 7.61-7.63 and getting the same type of error. I was running Drush 8.1.11. I restored from backup then tried upgrade from 7.61 to 7.62 - got the same error, then fupgraded to 7.63 and still same error, although the upgrades were 'successful' drush was broken - see below. So I restored the site from a backup to 7.61 and updated Drush to 8.1.18. After making sure that Drush was running properly, I ran the site upgrade again from 7.61-7.63. The site upgraded successfully then threw this error:
The error is similar to the same errors that were thrown in my previous attempts.
If I run a Drush command (drush status) from the Drupal root, I get this error:
Same error for every drush command. When I look for a function declaration of cache_get() in module.inc, i see 5 references to the function but no declaration.
If I run Drush commands outside Drupal root, no errors are thrown.
Comment #107
generalredneck CreditAttribution: generalredneck at Four Kitchens commented@chowdah,
Even after running drush cc drush you still get these issues? There is also a whole portion of the thread (and another issue) that is dedicated to working around cache_get issues.
Comment #108
chowdah CreditAttribution: chowdah commentedThanks so much for even caring @generalredneck! I saw the other issue at Fatal error: Call to undefined function cache_get(). So I was getting both errors - cache_get() and phar: The setup was Drush 8.1.18, php5.6 and drupal 7.63. The server is a dedicated box with some shared hosts, but I'm the only person who accesses it, and the global Drush install works for me.
Drush followed by any command would throw the cache-get() error - so I couldn't use cc all, even if I used Drush outside doc root with the site alias. I could clear drush cache outside doc root using drush cc drush though. I had issues using the ui to clear the cache, but it resolved itself I after I discovered some permission issues on the cache folder.
Even after using the ui to clear the cache, the same errors still existed in Drush. If I issued Drush alone without any additional commands, I would get phar: errors.
My next steps were changing the drush to drush.phar and linking it to drush, which failed. Drush was manually installed globally on my server without composer, so I avoided the composer route to avoid screwing up the drush install any further. The server is a dedicated box with some shared hosts, but I'm the only person who accesses it, and the global Drush install works for me.
My last step was to upgrade php on the site. I chose to upgrade to PHP 7.1, the minimum version for Drupal 7.63 according to the Drupal 7 Documentation*, and was expecting some major errors to come my way due to the major version change from 5.6, but was pleasantly surprise to only have to increase the memory limit in php.ini to get the site back to working order. When I opened SSH, and ran drush I bummed because the same errors persisted. I ran drush status outside document root, and it told me
After seeing drush was still running under 5.6, I upgraded the entire server's php to 7.1 and suddenly everything worked as expected.
Lastly, I wanted to mention that I double check all the files that were added to the 7.63 distribution - includes/file.phar.inc and all the files in misc/typo3/ and its sub-directories and found extra lines at the end of almost all of the files:
This may not have made a difference, but I have read that blank lines at the end of files sometimes cause parsing errors, so I removed the blank lines.
Thanks for working so hard on this! I hope any info I gave is useful.
*This may be the reason for my issue in the first place. I had no idea that 7.1 was the minimum recommended PHP for Drupal 7.63, until I found it in the documentation. Had I known, I would have started with the PHP upgrade before applying the 7.63 to the Drupal install. I see the PHP requirement as a major dependency change for this particular upgrade, so this fact should be shouting in your face prior to upgrade, even when using Drush to do so. I kept using 5.6 for so long because it worked very well for me until recently. I was unaware of the EOL date just recently passed for 5.6. Now that I have a stable environment with newer versions, I'll tweak my way through minor php versions, and then work through a migration to 8, which should be interesting as this particular site has matured through Drupal 6 previously, and I have over 10,000 nodes presently.
Comment #109
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedThank you for the kind words and from what I read, looks like you are going.
The reasoning behind this was because 5.6 end of lifed 31 Dec 2018. It's still supported as in, Drupal 7 will continue to maintain all the way down to PHP 5.2.4 per INSTALL.TXT, but highly recommend you maintain a version of PHP that at least is getting security upgrades. That's why the Documentation recommends 7.1, however, the CMS will function on 5.2.4. I might also add insecurely... particularly with this last security upgrade which will only secure your site if you are running 5.3.3 or above.
Quick question on this... Are you sure that the permissions you set up are read/writable by both the user using drush AND your webserver? That may be a place to look
This is totally starting to sound like APC cache to me... I wonder if a simple restart after your permission changes wouldn't have also handled this, but "would of, could of, should of" at this point right? I urge anyone else reading this to try clearing APC cache if you have it installed.
Comment #110
druel CreditAttribution: druel as a volunteer commentedIf you are using Git, or some other form of version control, and you push to a remote repo, make sure to add all the files introduced by Drupal 7.63. To resolve the Typo3 drush error, you would need to add and commit /includes/file.phar.inc and /misc/typo3/* before pushing the update to a remote repo. Otherwise your local site would be working fine, but the remote would give you Drush errors because of the missing files.
Comment #111
chowdah CreditAttribution: chowdah as a volunteer commentedActually it was the other way around. I use Boost that creates a folder called 'normal' inside /cache. Sometimes when I clear the cache with Drush, it leaves empty folders in the normal folder. I usually clear the 'normal' folder by
Somehow I deleted the whole 'normal' folder accidentally, so I recreated it not realizing I was logged in as root instead of the user. Using ui to clear cache was resulting in 403 errors because of this, but all was good on the ui end after I changed permissions/ownership to the correct settings.
I had considered that to be a problem, but I was using opcache after abandoning APC when I upgraded the site from D6 to D7. I made a file called opcache_flush.php, and inserted the following code:
To flush the cache I just call the page in a browser. I did this step early on when I was getting errors.
Comment #112
sajiniantony CreditAttribution: sajiniantony commentedUpgraded to 8.6.7 successfully in dev environment. But after committing files to another instance shows Fatal error: Class 'TYPO3\PharStreamWrapper\Behavior' not found in /opt/web/core/lib/Drupal/Core/DrupalKernel.php on line 484
Comment #113
bgronek CreditAttribution: bgronek commentedI just encountered this issue as well. What seems to be happening for me is that I've been using the Intellij / PHPStorm git tools to manage updates. These tools will automatically exclude any new libraries in the vendor directory causing this issue.
This was fixed by running a command line git add --all from the git root ensures that these libraries are added to the repository and make it into the repo.
Comment #114
neuewerte CreditAttribution: neuewerte commentedWe had an old global installed drush version on the dev server (6.7.0), when calling this instead of the local project drush (version 8.1.18) this error does no longer come up. Will check if scripts are working as expected until a final fix is found.
Comment #115
igel CreditAttribution: igel commentedUpgraded to 8.6.8 successfully in dev environment. But after committing files to another instance shows Fatal error: Error: Class 'TYPO3\PharStreamWrapper\Behavior' not found in {{server_path}}/core/lib/Drupal/Core/DrupalKernel.php on line 484
Comment #116
hkirsman CreditAttribution: hkirsman commentedAs stated above in #96, I got rid of the error also when removing memcached from my Lando configuration.
I have Lando rc1 installed and the configuration disabled is:
Comment #117
juankvillegas CreditAttribution: juankvillegas commentedI administer 2 different servers with a lot of production websites each one.
The first one uses memcache and after renaming and creating the symbolink link for drush.phar it allowed me to update all the websites (Drupal 7 and Drupal 8) without problem, and drush still works on all of them after the upgrade.
The second server doesn't have memcache, and even renaming and creating the symbolic link for drush.phar (that fixed the issue in the first server) didn't fix the problem and I had to upgrade all the websites (Drupal 7 and Drupal 8) "manually"... and now I can't use drush to administer any of those websites.
Comment #118
generalredneck CreditAttribution: generalredneck at Four Kitchens commentedWe probably should revisit this issue and consolidate the reports into the description... Have a reset so to speak.
The problem we are having is there are a bunch of symptoms with fragmented steps to reproduce but no narrowed down "cause". For the drush cache incident I reported having, there is a workaround and I feel that's the "Valid fix"... kill your drush cache...
We then have the Hitby and others have been having which also seem to be drush related as they can fix it using composer based drush.
Then we have cache stored in Memcache that seems to be causing grief, which again, is a problem with caching not being cleared enough.
I'm looking for an "action" to take here, whether it be "lets document the things" or debug to make a code fix.
Comment #119
Anonymous (not verified) CreditAttribution: Anonymous commentedEncountered [Tue Feb 05 13:33:02.059828 2019] [php7:notice] [pid 25701] [client 10.197.254.1:40392] Error: Class 'TYPO3\\PharStreamWrapper\\Behavior' not found in /var/www/html/drupal/core/lib/Drupal/Core/DrupalKernel.php on line 484 #0 /var/www/html/drupal/core/lib/Drupal/Core/DrupalKernel.php(692): Drupal\\Core\\DrupalKernel->boot()\n#1 /var/www/html/drupal/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n
When updating from 8.6.5 to 8.6.6, 8.6.7 and 8.6.8. Always returned to working 8.6.5 before trying another update.
We use the manual method to apply updates. Do not have drush installed. Site was not created with composer, but composer is used to require modules.
My Resolution:
- Renamed directory /var/www/html/drupal/vendor/typo3
- Ran "sudo composer update –prefer-source vendor/typo3"
- Cleared composer cache
- Cleared Cache in site
- Ran Update.php
- Ran cron
Working
Comment #120
bleen CreditAttribution: bleen at NBCUniversal commentedThe issue description suggests using Drush 9 .... I have tried this but still have the issue. (In the code snippet above I was attempting the rename drush to drush.phar trick, but that didnt work either)
... just upgraded to 8.6.9 locally. This issue only occurs once I pushed the code to prod and tried to run updb
reverting the code back to its previous state (8.6.3) fixed the issue so the site wasn't broken but Im otherwise stuck on updating to 8.6.9
Comment #121
plachI'm able to reproduce this consistently on 7.63 with the following STR:
I doubt this is exactly the same issue folks are reporting, since I only get the exception with that specific command, but maybe the root cause is the same. In my case the problem is that the first usable backtrace item is a script outside of the drush PHAR, so the check in
\Drupal\Core\Security\PharExtensionInterceptor::baseFileContainsPharExtension(), line 72 fails.So far, the only fix I found was to rename back
drush-phartodrush.phar.Comment #122
d0t101101 CreditAttribution: d0t101101 commentedThis is what finally fixed it for me, running Drush 8 / Drupal 7.64 / PHP 7.2:
Comment #123
ayduns CreditAttribution: ayduns commentedStepping through the suggested fixes:
1) was already using 8.1.18
2) & 3) no difference
4)
drush cc drush- this worked for me. Subsequentdrush cc allthen worked but previously had been giving the reported error.Comment #124
zeezhao CreditAttribution: zeezhao commentedFollowing #122 did not work for me. But I am now getting a different error:
I had to manually upgrade from drupal 7.63 to 7.65 by copying files across.
Running php 5.5.30 & mysql 5.6.41. Still gives same error after upgrade.
Mysql is in the PATH so this is not the issue.
Please has anyone got any more suggestions? Thanks.
Comment #125
neilmc CreditAttribution: neilmc commentedWas running into the following error when running any drush command.
PHP Fatal error: Uncaught TYPO3\PharStreamWrapper\Exception: Unexpected file extension in "phar:///usr/bin/drush/commands/core/drupal" in /esource/html/misc/typo3/drupal-security/PharExtensionInterceptor.php:38My setup is:
PHP 7.2.16
Drush 8.2.3
Drupal 7.6.5
Centos 7
I fixed this issue by installing memecached and php-memcached.
Hope this helps!
Comment #126
mikeocana CreditAttribution: mikeocana at Promet Source commentedUpgrading to Drush version : 8.1.18 works for me.
Hope will help
Comment #127
tormiI have memcached service defined and previous temp solution was to disable it.
But seems like upgrading Drush indeed does the trick. I am using Lando where 8.1.18 is the default Drush version, upgraded to latest 8.2.*:
.lando.yml:Comment #128
ultrabob CreditAttribution: ultrabob commentedWith a setup like the original poster where my drush command is aliased to the drush command sudo's as the apache user. I needed to clear the drush cache as the apache user to see the effects of these debugging steps:
1) make sure I'm not in a document root for a drupal site (I don't know if this matters or not)
2) sudo -u www-data /usr/local/bin/drush.phar cc drush
I'll have to wait and see if this clears up the issues I was having with the error showing up on all my cron runs, but it was appearing whenever I ran drush as the apache user, and it doesn't anymore. I hope that helps someone like me who is aliasing drush to another user.
Comment #129
MustangGB CreditAttribution: MustangGB commentedOn D7.67 (coming from pre-D7.63) got the
cache_get()error inmodule.inc, hacked in acache.increquire, and it spat out aError: Class 'finfo' not found.So for me it seems to have stemmed from using a minimal PHP7 install that doesn't include PECL fileinfo by default (Alpine Linux).
Resolved with a
sudo apk add php7-fileinfo.Hopefully that helps someone else out (probably a future me at the very least).
Comment #130
ioannis.cherouvim CreditAttribution: ioannis.cherouvim commentedI have
require_once 'httpful.phar';in a custom module (phar is downloaded from http://phphttpclient.com/#install and is local to the module which does therequire_once) and simply executingdrush statusfails with:> Unexpected file extension in "phar://httpful.phar/Httpful/Bootstrap.php"
It fails because
PharExtensionInterceptor#assertis called with $pathphar://httpful.phar/Httpful/Bootstrap.phpand$this->baseFileContainsPharExtensionreturnsFALSEfor that path. And that happens becauseHelper#determineBaseFiletokenizes the above path to:but for all 3 cases
@is_filereturns FALSE. Shouldn't it return TRUE for the last case sincehttpful.pharindeed exists on the same file location as my module?Note that even if I require the absolute path like
require_once '/var/www/html/sites/all/modules/custom/example/httpful.phar';then the resolved path is stillphar://httpful.phar/Httpful/Bootstrap.phpand not something likephar:///var/www/html/sites/all/modules/custom/example/httpful.phar/Httpful/Bootstrap.phpwhich I think would solve the problem.Comment #131
zweishar CreditAttribution: zweishar commentedThe solution provided by @tormi in #127 worked for me as well.
Moving from Drush 8.1.17 -> 8.2.3 has everything work as expected.
Comment #132
Asome CreditAttribution: Asome commentedThe solution provided by @MustangGB worked for me, thank you
Comment #133
bserem CreditAttribution: bserem at zehnplus commentedThe only thing that allowed drush to run, on a shared server I had issues with, was the patch by alexpott in #20.
I will change this to reviewed, only to attract some attention. Feel free to revert the status.
Comment #134
juampynr CreditAttribution: juampynr at Lullabot for NBCUniversal commentedUsing Drupal 7.69, I managed to overcome this issue by installing Drush 8 via composer instead of by downloading from the Releases page. Here is a diff from the change that I did at CircleCI:
Comment #135
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedUpgrading drush to 8.3.3 worked for me in D7.
Comment #137
mikeocana CreditAttribution: mikeocana at Promet Source commentedI encountered the same issue.
Environment info:
PHP 7.2.25
Drush 8.3.3
Drupal 7.72
Worked for me :
cd /usr/local/bin
mv drush drush.phar
ln -s drush.phar drush
rm -rf ~/.drush/cache
cd /app/docroot
drush @none cache-clear drush
Comment #138
mikeocana CreditAttribution: mikeocana at Promet Source commentedI encountered this again with the same issue after upgraded to PHP 7.3.18.
Environment info:
PHP 7.3.18
Drush 8.3.3
Drupal 7.72
Worked for me :
cd /usr/local/bin
mv drush drush.phar
ln -s drush.phar drush
rm -rf ~/.drush/cache
cd /app/docroot
drush @none cache-clear drush
Comment #139
AnybodyJust ran into this problem on a Drupal 7.77 page with latest drush 8 version as drush.phar, PHP 5.4.27 and only #20 was able to fix the problem indeed! How can we proceed?
Comment #140
Gastonia CreditAttribution: Gastonia as a volunteer commentedHaving the same issue. Here is my situation, which is related to this SO thread
https://stackoverflow.com/questions/67788318/why-despite-drush-being-ins...
Using composer, I was able to install my version of Drush, 8.3.3, everything was working fine. Then, per that thread above, I needed PHP exec() to run a drush migration after a file upload. That script is ran as www-data instead of root. Try as I might, I could not get the composer installed version to be run under the www-data user (since it's technically a dummy account with no /home/ ).
The solution was to download the drush.phar file and install it manually. That's when everything fell apart.
Here is some environment info when I use composer-installed drush
Here is the same when I use the drush.phar file. Note, it does NOT matter what drush 8.x version, even the one mentioned above with the supposed fix, 8.1.18:
For me, it also does not matter the Drupal 7.x version.
Which version of 9.x doesn't require a drupal site to be composer managed? I can try that version to see if it helps.
Let me know what other info I can provide.
Comment #141
mcdruidThe patch in #20 (which seems to be reversed) was marked as RTBC in #133 but I'm not sure if there's been much discussion / review of the patch since then other than a few +1's.
I've not had time to go through all the comments in detail but it's not clear to me whether #20 should be (reversed and) committed? It looks like perhaps it'd help in some cases but not all.
This issue was added to the list for the next D7 release at the 11th hour, but I'm afraid it's not looking like a "quick win" from the point of view of reviewing and committing.
Back to NR because of that.
Comment #142
mcdruidAs mentioned it looks like the patch alone may not fix all the issues people have encountered here, but #20 is in (/ from):
https://github.com/TYPO3/phar-stream-wrapper/blob/v3.1.3/src/PharStreamW...
...which is what D9 currently pulls in:
https://git.drupalcode.org/project/drupal/-/blob/9.3.0-beta3/core/compos...
A few people have said the patch did fix the problem for them, so I'm happy to commit it.
Comment #143
mcdruidMarking as fixed because the patch has been committed, and I'm not sure there's anything else D7 core can do.
It sounds like the patch hasn't been the only thing people have done to overcome this error; ensuring drush is up-to-date is likely a good idea.
There are other comments here that others may find helpful (I've added credit for a few of these but I'm afraid it's likely I've missed some), but I don't see any reason to keep the issue open.
Comment #145
generalredneck CreditAttribution: generalredneck commentedThanks for all the hard work on this one. I know it was elusive and a pain. It always feels good to have closure.
Comment #146
Wim LeersThis actually caused a regression for me:
Comment #147
Wim LeersSteps to reproduce:
(The special PHP 7.4 sauce is just because Drush 8 does not support PHP 8.)
Comment #148
mcdruidI'm very glad that @Wim Leers noticed this several days before the next release.
Turns out I have been an idiot and we now have
PharStreamWrapper::stream_cast()twice.It looks like a) this patch had already been committed? and b) we don't have very good test coverage of this class in D7.
First things first, I'll revert the commit.
Comment #149
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedSomeone opened that as #3053503: 7.67 Upgrade breaks on PHP Fatal error: Class 'TYPO3\\PharStreamWrapper\\Resolver\\PharInvocationCollection' not found.
Comment #151
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedActually #3251305: Issue with latest Drush8 phar and Drupal 7 dev
Comment #152
mcdruidThanks @cilefen and @Wim Leers, and others who reported this snafu.
I filed #3251373: Improve test coverage for TYPO3\PharStreamWrapper in D7 to improve (/ create) test coverage.
Comment #153
mcdruidActually, perhaps tests would have caught this but I didn't run them properly before commit (maybe partly because the patch was reversed?)
Totally my fault either way, but would be good to see if tests would have caught this if I'd actually tested the patch properly.
NR to test the patch (which is what was actually committed).
Comment #154
mcdruid...and did I get totally the wrong end of the stick with the patch being reversed? Perhaps it was the removal of the method that was being proposed. That would probably make much more sense.
I'm glad there's time to clean up this mess before the release on 2021-12-01 :)
Comment #155
mcdruidOkay, so yes this was my fault; I think I misunderstood what the patch was doing and didn't test properly before commit.
I'll leave the other issue open to have closer look at what test coverage there is for the class at some point, but #153 shows that the testbot would have warned about this if I'd only asked :)
Thanks for catching my mistake quickly.
Comment #156
MustangGB CreditAttribution: MustangGB commentedWhere was this fixed?
#20 hasn't been committed, and the
stream_cast()function is still in head.Not saying it needs to be, or should be committed, but fixed isn't the right status for "let's not do anything".
So putting back to "needs review" so someone can decide to either commit or won't fix.
Comment #157
DamienMcKennaFollowing up again.
I ran into this after updating a D7 site from 7.82 to 7.83, and applying #20 did indeed resolve the problem. My Drush v8.4.8 install comes from inside a ddev 1.17.1 container.
Comment #158
stephencamilo CreditAttribution: stephencamilo as a volunteer commentedComment #159
gregglesRevert vandalism
https://www.drupal.org/project/site_moderators/issues/3276540
Comment #160
pminfToday I got this error on drush locale:update which returned [warning] No configuration objects have been updated. I could workaround by
So for me it seems to fail if I'm using drush launcher AND a drush command is returning a warning.
My setup:
Comment #161
solideogloria CreditAttribution: solideogloria commentedI got this today on update to Drupal 9.4.0 as well. After running
drush cim -yI saw this:Looking at the path
phar:///usr/local/bin/drush/.box/bin/core/modules/mysql/src/Driver/Database/mysql//Delete.php, it has the path to Drush (which is not a folder), followed by a path toDelete.phpin themysqlmodule. However, there's an extra/in the path.Running the
drush cim -ycommand again did not have the error, nor did running other commands.Drush Commandline Tool 11.0.9
Drupal 9.4.0
Comment #162
pminfAs it turned out in another deployment, the returned warning from #160 does not cause the error, because Drush failed again after
locale:updateeven though there was only a notice.Unfortunately this does break our deployment and we need to use Drush directly without the launcher :-/
Comment #163
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedWe're running into the same issue after updating to 9.4.0, except the local installation that initially performed the update. The error from above occurs "randomly" in approx. Every second `drush cim` fails with the error. The other ones seem to work fine.
Comment #164
solideogloria CreditAttribution: solideogloria commentedAfter looking at the previous comment, I tried again. I can confirm, I get the error every other time (every 2nd time) when I run
drush cim -y. The off times work successfully.Still, even when the error occurs, it doesn't prevent the command from working as expected, and it doesn't fail my CI/CD pipeline.
Comment #165
solideogloria CreditAttribution: solideogloria commentedComment #166
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedThis is related to how the autoloader is build. The autoloader should contain an absolute path. Drupal Core uses a relative path. This can be override via settings.php. Here is an example for mysql.
Comment #167
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI have posted a core patch in #3291830: Fix PSR4 path for database driver
Comment #168
ollie-db CreditAttribution: ollie-db commentedI had the same issue after updating to 9.4.1 from 9.3.15 and #166 helped.
Comment #170
poker10 CreditAttribution: poker10 at ActivIT s.r.o. commentedThis was switched to 9.4.x-dev recently, but 7.x-dev part was not fixed at all, see #155, #156 and #157. I do not think this should be marked as fixed.
Comment #171
mcdruidYeah what a confusing issue this now is.
We may still want to commit #20 to D7 (without reversing it this time).
Is there anything still outstanding for D9?