Git Product home page Git Product logo

Comments (8)

Mcgurk125 avatar Mcgurk125 commented on June 5, 2024

I noticed that the comments mention that PHP 5.4 is required. Do you mean is a minumum requirement or this exact version is needed?

from cloudinary_php.

cloudinaraz avatar cloudinaraz commented on June 5, 2024

Hi @Mcgurk125,

The PHP 5.4 is a minimum requirement.

The reason you get this error is that you did not install the package through composer.
If you do have composer in your project, running composer dump-autoload -o from your command line should solve the issue.

In case you don't use composer and would like to fix the issue manually, you can try and add the following the top of your Api.php file (which in your case is located in the root folder):

namespace Cloudinary\Api {
  class Error extends \Exception {}
  class NotFound extends Error {}
  class NotAllowed extends Error {}
  class AlreadyExists extends Error {}
  class RateLimited extends Error {}
  class BadRequest extends Error {}
  class GeneralError extends Error {}
  class AuthorizationRequired extends Error {} 
  class Response extends \ArrayObject {
    function __construct($response) {        
        parent::__construct(\Cloudinary\Api::parse_json_response($response));
        $this->rate_limit_reset_at = strtotime($response->headers["X-FeatureRateLimit-Reset"]);
        $this->rate_limit_allowed = intval($response->headers["X-FeatureRateLimit-Limit"]);
        $this->rate_limit_remaining = intval($response->headers["X-FeatureRateLimit-Remaining"]);
    }    
  }  
} 

from cloudinary_php.

Mcgurk125 avatar Mcgurk125 commented on June 5, 2024

from cloudinary_php.

Mcgurk125 avatar Mcgurk125 commented on June 5, 2024

That has worked! Thank you. I am now just getting a connection refused, do you know if that is common issue on shared hosting?

from cloudinary_php.

cloudinaraz avatar cloudinaraz commented on June 5, 2024

@Mcgurk125 I can see that you also have an open ticket with us on our support system, related to the same issue. It seems like you've managed to solve the connection refused error that you've been experiencing. Is that correct?

from cloudinary_php.

Mcgurk125 avatar Mcgurk125 commented on June 5, 2024

from cloudinary_php.

vjnvisakh avatar vjnvisakh commented on June 5, 2024

thank you so much

from cloudinary_php.

cloudinaraz avatar cloudinaraz commented on June 5, 2024

@vjnvisakh you're welcome. Just please note that although this solution works, it is most advised that you use the autoloader.php approach that I suggested you in the support ticket you opened.

from cloudinary_php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.