Uncaught GuzzleHttp\Exception\ConnectException: cURL error 7: (XeroAPI) - php

Having an issue with the XERO API when trying for the first time. This is with a clean LAMP install with SSL certificate in place.
When I go to authorization.php it takes me to Xero to authenticate and then back to callback.php with the following error.
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 7: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in /var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:200 Stack trace: #0
/var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(155): GuzzleHttp\Handler\CurlFactory::createRejection() #1
/var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(105): GuzzleHttp\Handler\CurlFactory::finishError() #2
/var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish() #3 /var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke() #4
/var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}() #5
/var/www/train in /var/www/DOMAIN.CO.UK/public_html/xero/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 200
I've no idea what this issue is and ive tried looking online everywhere with no joy.
My set up is:
Centos 8
PHP 7.4.6
Apache2

Related

Prestashop 1.7 - Error 503 - Service Unavailable

We started to have an issue on our prestashop backoffice. First, everything was super slow and now it isn´t even possible to access administration because of error 503.
I tried to delete the cache, checked all resources in cpanel (everything good). I found something in error_log, but have no idea if this can be cause by this.
[04-Feb-2023 23:03:03 US/Central] PHP Fatal error: Uncaught InvalidArgumentException: Invalid resource type: array in /home/plexrgvc/public_html/modules/ps_eventbus/vendor/guzzlehttp/psr7/src/Utils.php:337
//UPDATED:
Stack trace: #0 /home/plexrgvc/public_html/modules/ps_eventbus/vendor/guzzlehttp/psr7/src/Request.php(57): GuzzleHttp\Psr7\Utils::streamFor(Array)
#1 /home/plexrgvc/public_html/modules/ps_eventbus/src/Api/GenericClient.php(178): GuzzleHttp\Psr7\Request->__construct('POST', Object(GuzzleHttp\Psr7\Uri), Array, Array)
#2 /home/plexrgvc/public_html/modules/ps_eventbus/src/Api/EventBusProxyClient.php(138): PrestaShop\Module\PsEventbus\Api\GenericClient->post(Array)
#3 /home/plexrgvc/public_html/modules/ps_eventbus/src/Service/ProxyService.php(76): PrestaShop\Module\PsEventbus\Api\EventBusProxyClient->uploadDelete('repeat:9740b8b0...', '{"collection":"...')
#4 /home/plexrgvc/public_html/modules/ps_eventbus/src/Service/DeletedObjectsService.php(51): PrestaShop\Module\PsEventbus\Service\ProxyService->delete('repeat:9740b8b0...', Array)
#5 /home/plexrgvc/public_html in /home/plexrgvc/public_html/modules/ps_eventbus/vendor/guzzlehttp/psr7/src/Utils.php on line 337
[04-Feb-2023 23:03:04 US/Central] PHP Fatal error: Uncaught InvalidArgumentException: Invalid resource type: array in /home/plexrgvc/public_html/modules/ps_eventbus/vendor/guzzlehttp/psr7/src/Utils.php:337
I tried to manually disable this module in phpmyadmin, but didn´t work. Any idea? Thanks

Vdeo-Call-App Fatal Error

I want to use Video-Call-App made by amirsanni.
Video-Call-App
in local server using wampserver it was great but i can't run it on server and i get this Fatal error :
Fatal error: Uncaught React\Socket\ConnectionException: Could not bind to
tcp://0.0.0.0:8080: Address already in use in
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/react/socket/src/Server.php:35 Stack trace: #0
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/cboden/ratchet/src/Ratchet/App.php(80): React\Socket\Server-
>listen(8080, '0.0.0.0') #1
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/bin/server.php(18): Ratchet\App->__construct('http://arash.my...',
8080, '0.0.0.0') #2 {main} thrown in
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/react/socket/src/Server.php on line 35
may help me run this app on server ? i'm new to this field please say me any thing that you think may i didn't do to run app.

Squareconnect fails to retrieve location_id

I am trying to embed square payment method to my site through its documentation given in the link below.
https://docs.connect.squareup.com/articles/processing-payment-php/
After receiving nonce, I am trying to get the location id as defined in the documentation. In console it always returns the following error:
Fatal error: Uncaught exception 'SquareConnect\ApiException' with message 'API call to https://connect.squareup.com/v2/locations failed: SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\my_project\vendor\square\connect\lib\ApiClient.php:245
Stack trace:
#0 C:\xampp\htdocs\my_project\vendor\square\connect\lib\Api\LocationApi.php(165): SquareConnect\ApiClient->callApi('/v2/locations', 'GET', Array, '', Array, '\\SquareConnect\\...')
#1 C:\xampp\htdocs\my_project\vendor\square\connect\lib\Api\LocationApi.php(105): SquareConnect\Api\LocationApi->listLocationsWithHttpInfo('sq0atb-a8CwQY9D...')
#2 C:\xampp\htdocs\my_project\locations-test.php(10): SquareConnect\Api\LocationApi->listLocations('sq0atb-a8CwQY9D...')
#3 {main}
thrown in C:\xampp\htdocs\my_project\vendor\square\connect\lib\ApiClient.php on line 245
You might not have the most up-to-date CA certificate bundle. Try the steps in this related StackOverflow answer and see if that works: https://stackoverflow.com/a/19149687
If that doesn't work, what operating system version and what version of PHP are you using? In an interactive PHP console (php -a), what is the output of echo OPENSSL_VERSION_TEXT;? Finally, what is the output of openssl s_client -connect connect.squareup.com:443 (in cmd, not the PHP console)?

PHRETS Works Locally But Times Out On Web Server

I installed PHRETS with Composer and have been able to print information using CMD terminal and following the docs. I tried uploading all the files to my web server, but the page times out.
My error log shows the following:
PHP Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\ConnectException' with message 'cURL error 7: Failed to connect to rets-rald.realtyserver.com port 6103: Connection timed out' in /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php:126
Stack trace:
#0 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Array, Array, Array)
#1 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php(96): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Array, Array, Array, Array, Resource id #69)
#2 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php(68): GuzzleHttp\Ring\Client\CurlHandler->_invokeAsArray(Array)
#3 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/Middleware.php(54): GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array)
#4 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/Middlewa in /public_html/phrets/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 49
How can I get it working on the web server? Below is my configuration.
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://rets-rald.realtyserver.com:6103/saskatchewan/rets/login');
$config->setUsername('username');
$config->setPassword('password');
$config->setRetsVersion('1.5');
$config->setUserAgent('PHRETS/2.0');
$config->setHttpAuthenticationMethod('digest');
$config->setOption('use_post_method', false);
$config->setOption('disable_follow_location', false);
Turns out, I just needed to enable port 6103 on the server.

Uncaught exception 'TTransportException' with message 'TSocket read 0 bytes'

Everything fine on Localhost but on server its showing and error like
PHP message: PHP Fatal error: Uncaught exception 'TTransportException' with message 'TSocket read 0 bytes' in /var/www/SH_MVC/library/thrift/transport/TSocket.php:263
Stack trace:
#0 /var/www/SH_MVC/library/thrift/transport/TTransport.php(87): TSocket->read(4)
#1 /var/www/SH_MVC/library/thrift/transport/TBufferedTransport.php(109): TTransport->readAll(4)
#2 /var/www/SH_MVC/library/thrift/protocol/TBinaryProtocol.php(300): TBufferedTransport->readAll(4)
#3 /var/www/SH_MVC/library/thrift/protocol/TBinaryProtocol.php(192): TBinaryProtocol->readI32(NULL)
#4 /var/www/SH_MVC/library/thrift/packages/user_node/User_nodeService.php(460): TBinaryProtocol->readMessageBegin(NULL, 0, 0)
#5 /var/www/SH_MVC/library/thrift/packages/user_node/User_nodeService.php(419): user_node_User_nodeServiceClient->recv_create_article()
#6 /var/www/SH_MVC/application/models/neo4j.php(26): user_node_User_nodeServiceClient->create_article('testing1', '0a6c7824a972eea...', 'checking-neo4j', 'checking neo4j&...', '[{"id":"text-co...', '7" while reading response header from upstream, client: 000.00.0.000
i wrote a library on Scala with Neo4j and connected to php on ubuntu OS - same as Localhost(mymachine) and Server - its working perfect and with out any issues, but on live server its throwing an error. i copied the log information above. please help me on this.

Categories