(This is also an issue for 6.x-2.x-dev, but you can only select one release)

On line 8 of media_mover/contrib/mm_s3/mm_s3.install, there's the following check:

if (extension_loaded('curl') && !@dl(PHP_SHLIB_SUFFIX == 'so' ? 'curl.so' : 'php_curl.dll')) { $has_curl = true; }

This causes a particularly nasty WSOD in PHP 5.3: dl() is deprecated, and in many installs, completely missing. The error suppression on dl() causes a silent WSOD with no errors anywhere.

I'm not sure why mm_s3 even calls dl(): shouldn't extension_loaded('curl') be sufficient? Attached are two patches (one for 6.x-1.x-dev and one for 6.x-2.x-dev) that removes the dl() call and rewrites the check to conform to Drupal coding standards.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mark Trapp’s picture

Title: mm_s3 calls dl() in hook_requirements, dl() is removed in PHP 5.3 » mm_s3 calls dl() in hook_requirements, dl() is disabled in PHP 5.3

Update to more accurate title. It's not actually removed, it's just disabled unless explicitly enabled except for certain SAPIs.

According to the Changelog, it was deprecated and disabled for stability issues, and the recommended workaround is to use extension loading directives instead of dynamically loading an extension at runtime: http://php.net/manual/en/function.dl.php

Mark Trapp’s picture

One last comment, I swear. Now that dl() is removed, there's no need to perform logic on extension_loaded: it returns TRUE or FALSE. Rerolled patches.

RobinMofo’s picture

Sorry I'm going to add my two cents and include the use of get_t() function as specified in the hook_requirements API.

Hopefully this can be added to DEV soonish as I didn't see your issue before I started investigating the cause!

arthurf’s picture

I committed a slightly different version of these patches. Please let me know if it works for you

mjvesper’s picture

Running PHP 5.3 and tried the Oct 20, 2010 Dev release. Still get a WSOD when saving S3 settings.

mjvesper’s picture

Status: Needs review » Needs work

Guess I should change the status?

arthurf’s picture

Status: Needs work » Active

@mjvesper can you provide the actual error you're getting?

mjvesper’s picture

There is no error reported. I fill out the S3 form and save then it fails silently with a WSOD with no errors anywhere as the OP described.

arthurf’s picture

Did you check your php error log?

mjvesper’s picture

Sorry, had to reinstall Media Mover and get a fresh message. This is from the Apache error log for the latest dev while saving the mm_s3 settings:

[Sat Nov 20 13:29:23 2010] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error:  Call to undefined method S3::checkKeys() in /home/[path]/sites/all/modules/media_mover/contrib/mm_s3/mm_s3.module on line 141, referer: https://[path]/admin/build/media_mover/settings/mm_s3

So not dl() I guess, but still a WSOD.

arthurf’s picture

Status: Active » Needs review

@mjvesper I removed the dl from the class check function. Feel free to give the dev version a try

mjvesper’s picture

Thanks arthurf. Looking forward to giving it a retry. This module has a lot of potential.