Closed plagace00 closed 4 years ago
Did you correctly autoload- see https://getcomposer.org/doc/01-basic-usage.md#autoloading ?
No, I followed exactly the steps listed in https://podio-community.github.io/podio-php/
First I installed with composer require podio-community/podio-php
and then after that I was suppose to do the Hello world.
I guess there is some missing steps between the composer and the Hello world!
As suggested in https://getcomposer.org/doc/01-basic-usage.md#autoloading, I changed
require_once '/path/to/podio-php/PodioAPI.php';
for
require __DIR__ . '/vendor/autoload.php';
I now have this error:
Fatal error: Uncaught PodioConnectionError: Connection to Podio API failed: [60] SSL certificate problem: self signed certificate in certificate chain in /Applications/AMPPS/www/podio/vendor/podio-community/podio-php/lib/Podio.php:261
Stack trace:
#0 /Applications/AMPPS/www/podio/vendor/podio-community/podio-php/lib/Podio.php(107): Podio::request('POST', '/oauth/token', Array, Array)
#1 /Applications/AMPPS/www/podio/vendor/podio-community/podio-php/lib/Podio.php(60): Podio::authenticate('app', Array)
#2 /Applications/AMPPS/www/podio/podio.php(93): Podio::authenticate_with_app('XXXXXXXXXX', 'YYYYYYYYYYYYYYY...')
#3 {main}
thrown in /Applications/AMPPS/www/podio/vendor/podio-community/podio-php/lib/Podio.php on line 261
Where XXXX is the app ID and YYYY is the Token for the app.
ok, I just fixed the SSL Certificate error by changing this line in /vendor/podio-community/podio-php/lib/Podio.php line 28
from
curl_setopt(self::$ch, CURLOPT_SSL_VERIFYPEER, 1);
to
curl_setopt(self::$ch, CURLOPT_SSL_VERIFYPEER, 0);
Now it's working. This is not straight through Hello World!
Hi @plagace00
Thanks for posting the update, generally the certificate problem is not related to this lib but to the PHP installation at hand - see eg https://stackoverflow.com/a/23585500
We‘ll keep this issue open until the readme is reflecting the issues you encountered.
hi, since my Podio api scripts are not working anymore, i read all here again. Do i really have to install the composer, php, libraries and more locally and then upload it to my server? with the old API i get error messages, with the new API of course "PodioAPI.php" is missing and i don´t understand what to do now? php8 broke everything...
ok, I feel weird to ask this but it's been days I am looking for an answer on this and can't find anything.
PodioAPI.php seems to be missing in the package.
I installed the package with composer, and it created a vendor directory with the following structure: autoload.php composer/ kint-php/ podio-community/
But there is no "PodioAPI.php"
I found something that might looks like something to work, vendor/podio-community/podio-php/lib/Podio.php but it's not working.
Where is "PodioAPI.php"? Should it be manually generated? If so how?
Regards