Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined function GuzzleHttp\Psr7\try_fopen() #44

Open
odilov-sh opened this issue Oct 29, 2021 · 3 comments
Open

Call to undefined function GuzzleHttp\Psr7\try_fopen() #44

odilov-sh opened this issue Oct 29, 2021 · 3 comments

Comments

@odilov-sh
Copy link

odilov-sh commented Oct 29, 2021

I am trying to upload file to amazon, but I got this error

Call to undefined function GuzzleHttp\Psr7\try_fopen()

vendor\frostealth\yii2-aws-s3\src\handlers\UploadCommandHandler.php line 48

My code:

$result = $s3->commands()->upload('e:\Video\short videos\The Small Business Story – short video no captions.mp4', '/uplod/29/10/small.mp4')->withAcl('private')->execute();

How can I fix that?

@cozumel424
Copy link

See #43

@Levon770
Copy link

Is there any reason, that this issue still exist?

@SplendornetTech
Copy link

SplendornetTech commented Feb 4, 2024

Change lines 47 through 51 with following code

if (is_string($source)) {
            $source = Psr7\Utils::tryFopen($source, 'r+');
        }

        return Psr7\Utils::streamFor($source);

in UploadCommandHandler file. It was fixed, but again it has reappeared breaking production systems, can someone fix it for good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants