php OAuthException after url changes - php

I have a php site (Site A) that users are logged into by clicking a link on a different site (Site B) and it works great!
Recently Site B changed their domain name. After making the correct name changes on Site A, I am getting the following error message:
OAuthException Object ( [message:protected] => making the request failed (Peer certificate cannot be authenticated with given CA certificates) [string:Exception:private] => exception 'OAuthException' with message 'making the request failed (Peer certificate cannot be authenticated with given CA certificates)'
The line that is causing this error is $oauth->fetch("$api_url");
After forwarding this error to our provider, they simply said it was not an issue on there end.
cUrl enabled: version 7.46.0
Windows Server 2008 Standard Edition Service Pack 2
php 5.6.18

Related

sugarcrm invalid credentials for local instancce

Scenario
I have backup of our latest SugarCRM instance of Production which I want to run on local machine.
I've done setup of DB and have configured in config.php.
I'm using SugarCRM Enterprise, Version 9.3.0 (Build 113) (Winter '20)
Errors
Currently I'm getting following error on browser
Invalid Credentials No valid authentication for User.
And in console I'm getting
http://crm93.aws09.<domain>.local/rest/v11_7/ping?platform=base 401 (Unauthorized)
Though I'm getting 200 for following
http://crm93.aws09.<domain>.local/rest/v11_7/metadata/public?type_filter=&platform=base&module_dependencies=1

Getting error The redirect URI is not registered properly with DocuSign when I followed their tutorial

I'm using windows, xampp and fairly new on integrating docusign. I watched this tutorial from docusign using PHP, however since the tutorial is using mac, I'm getting confused on how I will setup this tutorial on my xampp and windows and the result is I'm getting the error:
The redirect URI is not registered properly with DocuSign
Here is how I did my setup
1.) Clone the repository and place it on my xamp/htdocs/eg-something-something
2.) Rename the ugly repository name to xamp/htdocs/docusign/
3.) Run composer install to get the dependencies
4.) I configured my ds_config.php and here is my code... I removed credentials for security purposes
<?php
// ds_config.py
//
// DocuSign configuration settings
$DS_CONFIG = [
'ds_client_id' => 'xxxx', # The app's DocuSign integration key
'ds_client_secret' => 'xxx', # The app's DocuSign integration key's secret
'signer_email' => 'xxx#gmail.com',
'signer_name' => 'Michael',
'app_url' => 'http://localhost/docusign/public', // The url of the application.
// Ie, the user enters app_url in their browser to bring up the app's home page
// Eg http://localhost/eg-03-php-auth-code-grant/public if the app is installed in a
// development directory that is accessible via web server.
// NOTE => You must add a Redirect URI of app_url/index.php?page=ds_callback to your Integration Key.
'authorization_server' => 'https://account-d.docusign.com',
'session_secret' => '{SESSION_SECRET}', // Secret for encrypting session cookie content
'allow_silent_authentication' => true, // a user can be silently authenticated if they have an
// active login session on another tab of the same browser
'target_account_id' => false, // Set if you want a specific DocuSign AccountId, If false, the user's default account will be used.
'demo_doc_path' => 'demo_documents',
'doc_docx' => 'World_Wide_Corp_Battle_Plan_Trafalgar.docx',
'doc_pdf' => 'World_Wide_Corp_lorem.pdf',
// Payment gateway information is optional
'gateway_account_id' => '{DS_PAYMENT_GATEWAY_ID}',
'gateway_name' => "stripe",
'gateway_display_name' => "Stripe",
'github_example_url' => 'https://github.com/docusign/eg-03-php-auth-code-grant/tree/master/src/',
'documentation' => false
];
$GLOBALS['DS_CONFIG'] = $DS_CONFIG;
5.) I log into my admin sandbox and use this as my redirect URI
http://localhost/docusign/public/index.php?page=ds_callback
The web app is running but I am having an error of "The redirect URI is not registered properly with DocuSign" when I click the login or just by authenticating.
Thanks for helping me on this issue.
Update part:
I tried adding http:// on the configuration of the integration key on sandbox, however, I'm getting a fatal error:
Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL
error 77: error setting certificate verify locations: CAfile:
C:\xampp\apache\bin\curl-ca-bundle.crt CApath: none (see
http://curl.haxx.se/libcurl/c/libcurl-errors.html) in
C:\xampp\htdocs\docusign\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php
on line 186
Once I tried to authenticate. Check this screenshot for the errors.
try http://localhost/docusign/public/index.php?page=ds_callback as the redirect URL.
You need the complete URL including the http:// part.

Twitter API returns "could not authenticate you"

I'm trying fetch some data from Twitter API. I've got a shared host with SSL support and I've configured my Twitter developer account.
However, if I try to load my script (as per example) it returns:
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
Fatal error: Uncaught Exception: Unknown SSL protocol error in connection to api.twitter.com:443 in
My script is based on https://github.com/J7mbo/twitter-api-php

Stripe_Charge::create error in PHP

Stripe payments on our live e-commerce site have started failing 100% of the time with:
ERROR - 2015-06-02 10:56:20 --> Stripe_ApiConnectionError Object
(
[message:protected] => Unexpected error communicating with Stripe. If this problem persists, let us know at support#stripe.com.
(Network error [errno 77]: Problem with the SSL CA cert (path? access rights?))
....
The error is thrown from [application]/libraries/stripe/Stripe/ApiRequestor.php
The server is running CentOS release 6.6 (Final)
It refers to an SSL CA cert - but our certs are not installed on the server because SSL is terminated on a proxy. We have not changed any application code since last week, when it was working OK. However we did install some system updates.
What's confusing is that it points to an SSL problem, yet SSL is not terminated on the web server. Can anyone advise?

Janrain settings not getting saved in Drupal (Error Contacting Engage)

This is happening in our local web server installed using XAMPP
Steps to reproduce the issue:
Registered the account with Janrain.com
Created the app "testapp" and configured the engage application with the
providers Yahoo!, Twitter and Linked In.
Downloaded the Janrain Engage Drupal 7 module from the Janrain website
Installed this module in my local web application.
Activated the plugin and in the Janrain Drupal settings page, I entered the following details - a) Engage Server & b) API Key
After giving these details, clicked on the "Save Configuration" button. Finally, instead of the information being saved, we get the error message
"Error message Error contacting Engage. Please verify your internet connection and try again."
I tried to look in to the code, the below line was creating the issue
$lookup = RPX::lookup($api_key, $rpx_server);
Checked the "lookup" function code and found that I was able to connect with the Engage server but some problem with the response.
In this "lookup" function, we are getting the below JSON response
stdClass Object
(
[request] => POST https:// rpxnow.com /plugin/lookup_rp HTTP/1.0
Referer: http:// localhost /testapp
User-Agent: Janrain_Engage_Drupal_Module
Proxy-Authorization: Basic
Host: rpxnow.com Content-Length: 105 [data] => "" [protocol] => HTTP/1.0 [status_message] => OK [code] => 200)
9) Found that "data" facet in the JSON response was missing
Please let me know what is the solution for this issue?
This sounds like a web server configuration issue... the drupal_http_request() function is probably failing to run. There may be any number of fixes depending on what is specifically happening. More info here: https://drupal.org/node/222454

Categories