Skip to content

Error: Call to undefined function cl_image_upload_tag() in element #12

@robksawyer

Description

@robksawyer

I'm trying to use this code inside of a CakePHP (latest version) element. And I'm having some issues (see the error below).

Error: Call to undefined function cl_image_upload_tag() 

You can see the full element code at [https://gist.github.com/robksawyer/4a95a0f6c11f71df432f].

I've also added the following to bootstrap.php and cl_image_tag is working in the views.

/**
 * Cloudinary CDN Setup
 */
App::import('Vendor', 'Cloudinary/Cloudinary.php');
App::import('Vendor', 'Cloudinary/Uploader.php');
App::import('Vendor', 'Cloudinary/Api.php');

$cloudinaryURL = parse_url(getenv('CLOUDINARY_URL'));
define('CLOUD_NAME', $cloudinaryURL['host']);
Cloudinary::config(array( 
    "cloud_name" => $cloudinaryURL['host'], 
    "api_key" => $cloudinaryURL['user'], 
    "api_secret" => $cloudinaryURL['pass']
));
/**
 * End Cloudinary CDN Setup
 */

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions