AppleNewsAPI icon indicating copy to clipboard operation
AppleNewsAPI copied to clipboard

Can't find cURL class

Open goonydev opened this issue 7 years ago • 6 comments

Hello,

I just installed this library on my local machine running with EasyPHP. I followed the installation guide, but when I try to use the example file to post an article i get the following error:

Fatal error: Class 'ChapterThree\AppleNewsAPI\PublisherAPI\Curl' not found in C:\EasyPHP-Devserver-16.1\spip\AppleNewsAPI\src\PublisherAPI.php on line 20

Now I am not familiar with namespaces and aliases... Is this a common error newbies encounter? Is it the fact that the classes are in a "src" folder, that is not mentionned in the namespace?

Thank you for your time. Benoit.

goonydev avatar Sep 21 '17 23:09 goonydev

@goonydev It seems like your installation is missing curl library. Please make sure it is enabled

minnur avatar Sep 21 '17 23:09 minnur

You are right. I will try to install it and come back to close this ticket if it fixes the issue. Thank you for your help.

goonydev avatar Sep 22 '17 00:09 goonydev

Hi again,

I tried this time to install the library on a server that has cURL for sure, and I get the exact same message:

Fatal error: Class 'ChapterThree\AppleNewsAPI\PublisherAPI\Curl' not found in /xxxxxxxxx/AppleNewsAPI/src/PublisherAPI.php on line 20

I installed the package like it is told in the description. However, I got those warnings while running "composer.phar install":

Package kherge/version is abandoned, you should avoid using it. No replacement was suggested. Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead. Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.

It's too bad... I don't want to reinvent the wheel and write my own code to upload apple news articles. Do you have any idea what could be wrong?

Thanks in advance.

goonydev avatar Sep 28 '17 07:09 goonydev

by the way i get this message while trying to run /examples/PublisherAPI/PostArticle.php, and I made sure to fill the API ids (key, secret, channel_id) with mine.

goonydev avatar Sep 28 '17 07:09 goonydev

I made progress. I had to include "vendor/autoload.php" at the begining of PostArticle.php, is that right?

goonydev avatar Sep 29 '17 00:09 goonydev

Uh? Is Drupal necessary to use this library?

goonydev avatar Sep 29 '17 07:09 goonydev