Autoload files using composer in php website projects

Yes

Well yes, that’s always a risk when using third party code. It wouldn’t hurt to go through the code and check it isn’t doing anything harmful.

That’s not a malfunction of MAMP, that is cURL saying that whatever you want to connect to doesn’t have an SSL certificate that was signed by a trusted SSL signer. Best option here is to contact them and get them to install a proper certificates, especially now with free certs from parties like Let’s Encrypt.
Alternative you can tell cURL to ignore it, but I’d only use as a last resort when all else has failed.

2 Likes

Thanks alot, but i uploaded the files to my webhost in a domain that i have ssl installed and it worked, i got positive response from the call.

But when i use it on mamp or xampp the error code shows.

So my question is, which of the url is being validated for SSL?
Is it the https://test.api.amadeus.com/v1/security

Or the url where i hosted the files and making the calls from?

Secondly i need to know how to ignore the SSL so i can use it on my local machine. Or any better guide on installing encrypt cert in MAMP

And creating a base url that will look like this https://dev.testpand.com

So that i can be accessing the script in an SSL cert

The URL you connect to. Where you’re connecting from is irrelevant.

You can pass ['verify' => false] as the options. Again, do this only in development, do not do this is production where there is a valid certificate available!

See https://requests.ryanmccue.info/api/source-class-Requests.html#337

1 Like

Okay thanks but if not relevant why does it fail on MAMP but works on a live host whereas is still url that am connecting to.
I use verify false on MAMP and see if it works,
But please where exactly should place this
['verify' => false] because i dont know which variable they are using as the $ch ,

I have tried

curl_setopt($response_request,  `['verify' => false]`); 

Please look at the above code and tell me exactly where to add it.

So are you using curl_ methods or Requests? :confused: You can’t mix and match.

For Requests it would be like this Requests::get('some/url', [], ['verify' => false]);

In that case you probably don’t have a new enough CA bundle installed in your system. I’d ignore it for now. Let’s get it work first, then we can see if we can make it better.

1 Like

Thanks @rpkamp

I got it working also on xampp from where you pointed me to, i discovered i can turn off the verify ssl that is part of the options to false, is true by default.

But however thats not how i solved it, i looked closely from that session and saw that they bundled old caecert.pem in the lib, so i downloaded a fresh one and replaced it, without turning off the verify ssl.
Which goes to confirm your last statement that where am making the calls from is irrelevant.

Thank big time.

Lol, please don’t mind me i misplaced both, still learning their differences

Hi @pandglobal,

It seems this project is something we will be talking about for a while. It would be beneficial for you and us if you could put your project on Github so we can review it as a whole. It will save a lot of time and trouble in the long run. If it is some secret code you dont want the world to see you can make it a private repo and just grant access as you see fit.

1 Like

I have never said no to such a beautiful offer, having better and experienced hands work with me on a project.

But i had to unwillingly say no to this tempting offer because of privacy, and my clients concept protection.

He might think i sold out his idea.
I will take this offer when the concepts and ideas are all mine without a third party, am too young to go to jail for bridge of contract, (LOL)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.