I'm running PHP 5.4.45.

When saving the module settings page, a batch job begins that errors out with the following message:

PHP Fatal error: Class 'CurlFile' not found in /var/www/site.com/public_html/sites/all/modules/contrib/blazemeter/blazemeter.module on line 1390

CommentFileSizeAuthor
#4 curlfile-not-found-2714643-4.patch4.99 KBjustindodge

Comments

justindodge created an issue. See original summary.

tamerzg’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have php cURL enabled?
If thats not the problem can you try edit line 1390 in blazemeter.module and add a backslash before CurlFile like this:

$send_script = array('script' => new CurlFile($file, 'text/plain', 'user.properties'));
replace into
$send_script = array('script' => new /CurlFile($file, 'text/plain', 'user.properties'));

justindodge’s picture

I have php cURL enabled, I can see the module loading in php's config and php info tells me that curl support is enabled.

From what I can tell (http://php.net/manual/en/class.curlfile.php) the CurlFile class is only available for php 5.5.0 and above.

Drupal 7 should support PHP 5.4+, so I think putting a shim in place that has a fallback to procedure style cURL functions or something like drupal_http_request would be nice.

justindodge’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new4.99 KB

Here's a patch that works for me based on the latest 7.x dev.
This is based off of the approach that Guzzle takes: https://github.com/guzzle/guzzle/blob/3a0787217e6c0246b457e637ddd33332ef...

  • tamerzg committed 73c6a84 on 7.x-1.x authored by justindodge
    Issue #2714643 by justindodge: On saving module settings: PHP Fatal...
  • tamerzg committed fc558e5 on 7.x-1.x authored by justindodge
    Issue #2714643 by justindodge: On saving module settings: PHP Fatal...
tamerzg’s picture

Status: Needs review » Fixed

Thanks for the patch, its now committed to dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.