× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve,

Place the certificate bundle on the IFS and then point to it using CURLOPT_CAINFO, as described here:
https://stackoverflow.com/questions/35059118/certificate-ca-bundle-file-pem-php-curl-local-install <https://stackoverflow.com/questions/35059118/certificate-ca-bundle-file-pem-php-curl-local-install>

If you would like PHP itself to use the certificate bundle, follow Rod Flohr’s instructions:
https://zend18.zendesk.com/hc/en-us/articles/205679027-Add-a-trusted-certificate-authority-to-IBM-i-for-PHP-5-6

Best,
Alan

Alan Seiden
Principal, Seiden Group
The PHP on IBM i Experts

On Feb 6, 2018, at 4:29 PM, Steve Richter <stephenrichter@xxxxxxxxx> wrote:

getting this error when running CURL files/download from PHP

Error:SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed

I was able to go here and get a certificate that enabled cURL to work in
windows.
https://curl.haxx.se/docs/caextract.html

Is there a folder to copy that certificate to in the IFS to enable cURL to
work from PHP?

function dropbox_GetDebug( )
{
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "
https://content.dropboxapi.com/2/files/download";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxx";
$headers[] = "Dropbox-Api-Arg: {\"path\": \"/test_upload.txt\"}";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

return $result ;
}



thanks,
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.