Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Incorrect status is show for AWSSDK, this is a bit of an issue, because it causes nagios to alarm on the red status even though there is no problem at all.
Error at /admin/reports/status shows:
AWSSDK 1.5.1 [compatibility test] Your PHP environment does not support the minimum requirements for the AWS SDK for PHP.
Even though, everything is as it should be according to the compatibility test:
Minimum Requirements Test Should Be What You Have PHP 5.2 or newer 5.3.2-1ubuntu4.11 cURL 7.15.0 or newer, with SSL 7.19.7 (OpenSSL/0.9.8k) SimpleXML Enabled Enabled SPL Enabled Enabled JSON Enabled Enabled PCRE Enabled Enabled File System Read/Write Enabled Enabled Optional Extensions Test Would Like To Be What You Have OpenSSL Enabled Enabled Zlib Enabled Enabled APC Enabled Disabled XCache Enabled Disabled Memcache Enabled Enabled Memcached Enabled Disabled PDO Enabled Enabled PDO-SQLite Enabled Disabled SQLite 2 Enabled Disabled SQLite 3 Enabled Enabled Settings for php.ini Test Would Like To Be What You Have open_basedir off off safe_mode off off zend.enable_gc on on Other Test Would Like To Be What You Have Architecture 64-bit 32-bit Bottom Line: Yes, you can! Your PHP environment is ready to go! There are a couple of minor features that you won't be able to take advantage of, but nothing that's a show-stopper.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1429614-compatibility.patch | 3.91 KB | boombatower |
Comments
Comment #1
boombatower CreditAttribution: boombatower commentedIt works locally. Really not sure without more detail. Is that the output that you get after clicking the link (aka the web version of the test) or the cli? If it's the web version then I'm really not sure, can you debug it further?
Comment #2
boombatower CreditAttribution: boombatower commentedPlease reopen with more details.
Comment #3
coderintherye CreditAttribution: coderintherye commentedThat is the output after clicking the link for the web test. I just ran the command line test, which provides conflicting results, as I'll paste below. I'm going to note that either way, you're relying on what can only be described as a rather terribly brittle way to test for this.
I debugged it further, and the problem is that the command line compatibility check has two if conditions, the first one passes fine and says the "Your environment is compatible..." whereas the second one does a further check to see if the system is 64-bit, if it's not then it displays the failing message.
I'd highly suggest that you include the file and then just check the return value of the success function or some such, rather than doing a strpos() check, but if you are going to do that, then you should check for "Your environment meets the minimum requirements for using the AWS SDK for PHP!" instead of the bottom line message.
I'm pasting below two outputs from the test, the first is with the unmodified file, the second is when I remove the is64_ok check.
Comment #4
dmeigs CreditAttribution: dmeigs commentedI ran across this same issue. The problem is that sdk_compatibility_test.php uses
to indicate a pass, but sdk_compatibility_test_cli.php uses
elseif ($php_ok && $curl_ok && $simplexml_ok && $dom_ok && $spl_ok && $json_ok && $pcre_ok && ($apc_ok || $xcache_ok || $sqlite_ok))
as a passing score.
I'm not sure which is the correct set of tests.
Comment #5
boombatower CreditAttribution: boombatower commentedThe success() function:
tells us nothing about if the system is compatible. It is used to print out a success message. When I first looked at these scripts I was sad there was no programmatic way I could extra a pass/fail or somesuch short of strpos(). Perhaps such would be a good patch again upstream.
I also wonder why the two scripts differ as that seems inconsistent and I do not remember that being the case when I looked at them originally. I will file a report upstream and see what we can figure out.
Comment #6
boombatower CreditAttribution: boombatower commentedI submitted a pull request against the upstream SDK, https://github.com/amazonwebservices/aws-sdk-for-php/pull/23.
@nowarninglabel: Just to be sure would you go ahead and try the file from my github repo? You can download the raw file directly from https://raw.github.com/boombatower/aws-sdk-for-php/compatibility/_compat... or you can checkout the compatibility branch https://github.com/boombatower/aws-sdk-for-php/tree/compatibility.
Thanks for the detailed report.
Comment #7
boombatower CreditAttribution: boombatower commentedComment #8
coderintherye CreditAttribution: coderintherye commentedI can confirm I now get both successful results, both green. This works, thanks.
I guess it's not exactly a patch, but marking RTBC, hopefully it gets pulled in upstream.
Comment #9
boombatower CreditAttribution: boombatower commentedThanks for confirming that is fixes the issue.
If they accept the large overhaul changes then we can update awssdk module to be able to programmatic check a variable instead of doing string search.
Comment #10
boombatower CreditAttribution: boombatower commentedAmazon committed our changes upstream! I've updated the compatibility checking to take advantage of the changes.
Comment #11
boombatower CreditAttribution: boombatower commentedCommitted. Please reopen if the fix does not work.
Comment #12
Jorrit CreditAttribution: Jorrit commentedSeems to work fine over here, thanks for the quick responses. It is good to hear that the Amazon folks implement improvements from the community.
Comment #13
Khumbu CreditAttribution: Khumbu commentedi also can confirm that it works....thx
Comment #14
boombatower CreditAttribution: boombatower commentedThanks for the feedback, just made 5.3 release (http://drupal.org/node/1556722).