Cloudinary PHP: Fatal error: undefined function cloudinary_url()

Comments

4 comments

  • Avatar
    Aditi Madan

    Hi Alessandro,

    Thank you for sharing the error message.

    This error usually happens when the path is incorrect. The samples directory is supposedly at the same level as where your vendor folder is located. So I would suggest to move the samples folder there and give it a try again.

    Please test and let me know if you continue seeing the issue.

    Regards,
    Aditi

    0
    Comment actions Permalink
  • Avatar
    Alessandro

    Dear Aditi Madan, firstly, thank you for your prompt answer.

    I read your instructions, but I don't understand...
    is there supposed to be a "vendor" folder then ?

    I'm asking this because I followed the instructions here:
    https://cloudinary.com/documentation/php_integration#manual_installation

    Manual installation:

    So, I just copied the SRC FOLDER and AUTOLOAD.PHP ( and SAMPLES folder too ) directly inside my root folder. Aren't them enough to run Cloudinary correctly ?

    As I said, I did a manual setup, didn't use Composer ( isn't the "vendor" folder a composer's thing ? )

    Please help, thank you !
    Alessandro

    0
    Comment actions Permalink
  • Avatar
    Aditi Madan

    Hi Alessandro,

    My apologies, I missed the part that you are not using composer. If you are not using composer then you just need to change the settings.php file inside samples/basic with your config and then just run the command PHP -S localhost:8001 -t samples/basic and this should work.

    The part of copying autoupload.php and src was when you are creating your own project. It is not needed when running basic sample project. If you continue seeing the issue then can you please open a support ticket here: https://support.cloudinary.com/hc/en-us/requests/new and add your project link or zipped up project and I will try and reproduce it on my end. Also, can you please share which PHP version you are currently using?

    Regards,

    Aditi

    0
    Comment actions Permalink
  • Avatar
    Alessandro

    Hi Aditi, 

    The problem was the missing inclusion (of Helpers.php) inside the samples.

     

    Please see: https://github.com/cloudinary/cloudinary_php/issues/192

     

    Thank you so much for the help,

     

    Bye from Italy

    Alessandro

    0
    Comment actions Permalink

Please sign in to leave a comment.