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

Fast CGI appears to crash when I update AWS SDK for PHP #2959

Closed
luminajames opened this issue Jul 19, 2024 · 4 comments
Closed

Fast CGI appears to crash when I update AWS SDK for PHP #2959

luminajames opened this issue Jul 19, 2024 · 4 comments
Assignees
Labels
closed-for-staleness p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@luminajames
Copy link

luminajames commented Jul 19, 2024

Describe the bug

Hi,

I'm working on getting our EC2 instances running with IMDSv2 set to required. I found that we were using an old version of AWS SDK for PHP (Version 3.69.7) on some of our instances which was making IMDSv1 calls, so I needed to update them.

But, whenever I deploy the update, I'm getting a HTTP 500 error from IIS that says Fast CGI has encountered an error and has exited with code 0xc0000005 instead the home page of our site.

The only way I seem to be able to get it working again is if I use Git reset to revert the update and stop the instance and let EC2 recreate it.

In the PHP error logs, I did find this:

PHP Fatal error:  Call to undefined function Aws\is_valid_hostlabel() in D:\IISDATA\webroot\vendor\aws\aws-sdk-php\src\ClientResolver.php on line 877

I did search to see if anyone else had this specific issue and it seems some people run into this problem when they have the SDK installed twice. But I'm not sure how that would be the case for us, I can't see anything in composer.lock that would suggest it's installed twice. Other than that though, I can't find anything else in the logs.

Expected Behavior

The S3 and Lambda calls in my code should work.

Current Behavior

My IIS server returns 500 error messages saying Fast CGI has exited with code 0xc0000005.

Reproduction Steps

It seems I don't have this problem on my local machine. I'm not sure how best to provide a reproduction of it.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.147.7 and 3.173.19

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 5.6.38 on a Windows Server 2019 Datacenter edition (OS build: 17763.3287) machine running IIS (Version 10.0.17763.1)

@luminajames luminajames added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 19, 2024
@GrahamCampbell
Copy link
Contributor

GrahamCampbell commented Jul 20, 2024

This is a known issue with using functions instead of static class methods (the functions.php file). The issue occurs when you have a version of the SDK installed globally that is older than the version you have installed locally. Guzzle mitigated this issue by migrating off of global functions. See guzzle/guzzle#2740.

@GrahamCampbell
Copy link
Contributor

GrahamCampbell commented Jul 20, 2024

Oh, I see you are using PHP 5.6. There is unlikely to ever be a fix for this, since AWS has ended support for PHP earlier than 7.2.5 already (#2760), and is soon to end support for PHP older than 8.1.0 (#2952).

@yenfryherrerafeliz
Copy link
Contributor

Hi @luminajames as @GrahamCampbell said, we are not longer supporting PHP version 5.6. Would you please be able to update your PHP runtime to a most recent version or at least to 7.2.5 and by doing this, once you update the PHP SDK you will probably get the most recent version which will be more easy for us to assist you.

I look forward to your response.

Thanks!

@yenfryherrerafeliz yenfryherrerafeliz added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 23, 2024
@yenfryherrerafeliz yenfryherrerafeliz self-assigned this Jul 23, 2024
@RanVaknin RanVaknin added the p2 This is a standard priority issue label Jul 31, 2024
Copy link

github-actions bot commented Aug 3, 2024

This issue has not recieved a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Aug 3, 2024
@github-actions github-actions bot closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants