Active
Project:
Media Mover
Version:
6.x-1.0-beta9
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2012 at 15:24 UTC
Updated:
9 Apr 2012 at 02:33 UTC
The mm_s3_requirements (in mm_s3.install.php) contains a check for curl which includes a test for !@dl('curl.so'). I do not understand how the @ works when put before the call to dl() or if that is relevant, but the call causes a server error for me.
The full line is:
if (extension_loaded('curl') && !@dl(PHP_SHLIB_SUFFIX == 'so' ? 'curl.so' : 'php_curl.dll')) { $has_curl = true; }
The test for extension_loaded('curl') works just fine, and everything else about the site & code works fine if that !@dl() requirements check is removed. For what it's worth, I have confirmed that PHP_SHLIB_SUFFIX is 'so' so the call to dl() is using 'curl.so' as the parameter.
Could I be missing something in this new server install which allows dl() to function?
Comments
Comment #1
carteriii commentedI have since learned that the @ sign is supposed to suppress error messages (http://us3.php.net/manual/en/language.operators.errorcontrol.php) but there are a number of caveats. For example, any error message is not suppressed if there is a custom error handler.
Could it be that the error suppression simply does not work in this situation?
Comment #2
arthurf commentedYou should try the dev branch- that has a different way of testing if s3 can work.
Comment #3
carteriii commentedI finally got a chance to try the dev branch and it does appear to work, though I see that the call to !@dl('curl.so') has just moved into the mm_s3_class_check(). I expected it to fail just as it was before, but for some reason it is not. I can't explain it. I'm happy, but fearful that the server error return since I cannot explain. For now I'll go with the dev branch and keep my eye on it. Thanks.