PHP Error on uploading media via WordPress Plugin
I am on a WordPress installation getting the following error when I am trying to migrate my resources from WordPress installtion to the Cloudinary servers.
Fatal error: Uncaught Error: Call to undefined function curl_init() in /usr/share/nginx/html/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/lib/Uploader.php:346 Stack trace: #0 /usr/share/nginx/html/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/lib/Uploader.php(91): Cloudinary\Uploader::call_api('upload', Array, Array, '/usr/share/ngin...') #1 /usr/share/nginx/html/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/cloudinary.php(633): Cloudinary\Uploader::upload('/usr/share/ngin...', Array) #2 /usr/share/nginx/html/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/cloudinary.php(673): CloudinaryPlugin->upload_to_cloudinary('864', true) #3 /usr/share/nginx/html/wp-includes/class-wp-hook.php(286): CloudinaryPlugin->media_lib_upload_action('') #4 /usr/share/nginx/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #5 /usr/share/nginx/html/wp-includes/plugin.php(453): WP_Hoo in /usr/share/nginx/html/wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/lib/Uploader.php on line 346
-
Hi Pramathesh,
The error in that example implies your system doesn't have curl installed or enabled.
It's not a strict requirement for Wordpress itself, but it's commonly used by extensions, including ours, to make HTTP requests to remote servers. In this example, our plugin uses curl for uploading images and it's failing because curl isn't available.
Can you please try installing curl for PHP to your system and see if that resolves the issue for you?
If you can let me know which OS and frameworks you're using I can advise on more specific steps to follow, if you're unsure about how to install curl.Regards,
Stephen0
Post is closed for comments.
Comments
1 comment