PHP Fatal error: Uncaught SoapFault exception in error_log - php

I'm doing some requests to an external service, problem is that sometimes the external service is not responding (I think their server is offline or something like that).
The problem with that is the error which is written each time on the error_log:
[07-May-2022 04:31:05 UTC] PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /path/file.php:115
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://app.mela...', 'http://app.mela...', 1, 0)
....
....
How to avoid to write that error inside error log?
The code inside /path/file.php:115 is this:
$response = $this->client->getOrders($userId,$order,$orderColumn,$orderType,$limitStart,$limitSize);
Thanks for your help.

Related

PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host

I have PHP SOAP server which is communicate with another SOAP servers as a SOAP client. I have used nusoap library.
The SOAP server is working fine when traffic is low. But when server request incenses, we have received error for some of the requests
PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/public_html/api/soapserver.php:
Stack trace:
0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://100.20.5...', 'urn:NameSpc#Fin...', 1, 0)
1 /home/public_html/api/soapserver.php (103): SoapClient->__soapCall('FindClient...', Array)
2 [internal function]: FindClientInfo('username', 'password')
3 /home/public_html/api/lib/nusoap.php(4206): call_user_func_array('FindClient...', Array)
4 /home/public_html/api/lib/nusoap.php(3828): nusoap_server->invoke_method()
5 /home/public_html/api/soapserver.php(25): nusoap_server->service('<?xml version="...')
6 {main}
PHP Version is 5.4.45
Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp
Please suggest with necessary way to solve this issue. Thanks in advance.

PHP SOAP - Gives nonexistent [HTTP] Internal Server Error

By documentation from here https://itorrents.org/automation.php
I have added their example torrent (Ubuntu x64 for testing) and added the code just like instructed:
Example...
<?php
ini_set( 'soap.wsdl_cache_enabled', '0' );
$client = new SoapClient('http://itorrents.org/api/torrage.wsdl');
$infoHash = $client->cacheTorrent(base64_encode(file_get_contents('http://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent')));
echo $infoHash . "\n";
PS: Also, tested locally by downloading .torrent file and adding to the folder, same error. (Added direct link so those who test do not have to download it on their machine)
Error log...
Fatal error: Uncaught SoapFault exception: [HTTP] Internal Server Error in /var/www/htdocs/test/soap.php:6 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://itorren...', 'urn:xmethods-de...', 1, 0) #1 /var/www/htdocs/test/soap.php(6): SoapClient->__call('cacheTorrent', Array) #2 {main} thrown in /var/www/htdocs/test/soap.php on line 6

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.

simpleexcel : I get an error when I changed the host

Recently I have changed my host. On the previous host, every thing was ok, but now on the new host I get following error..
Please direct me to the host so I can solve this problem ASAP???
Fatal error: Uncaught exception 'Exception' with message 'Document namespace isn't a valid Excel XML 2003 Spreadsheet' in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php:198
Stack trace:
#0 /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php(305): SimpleExcel\Parser\XMLParser->parseDOM(Object(SimpleXMLElement))
#1 /home/jalali/public_html/admin/#dmin.php(28): SimpleExcel\Parser\XMLParser->loadFile('../archive/1371...')
#2 {main} thrown in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php on line 198

I'm getting "Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() Stack trace: #0 SoapClient->SoapClient(NULL, Array) #1 "

I'm getting with my hotel provider:
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() Stack trace: #0 SoapClient->SoapClient(NULL, Array) #1
I managed once to make a booking but then start getting this message.
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [soapclient.soapclient]: 'uri' option is required in nonWSDL mode in /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php:1983
Stack trace:
#0 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php(1983): SoapClient->SoapClient(NULL, Array)
#1 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-includes/template-loader.php(47): include('/home/fanzy44/p...')
#2 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-blog-header.php(16): require_once('/home/fanzy44/p...')
#3 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/index.php(17): require('/home/fanzy44/p...')
#4 {main} thrown in /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php on line 1983
According to the exception,
Uncaught SoapFault exception: ... 'uri' option is required in nonWSDL mode
So, referring to the SoapClient documentation:
options
An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, the location and uri options must be set, where location is the URL of the SOAP server to send the request to, and uri is the target namespace of the SOAP service.
Looking at your code:
$client = new SoapClient($hotelProBookingURL, array('trace' => 1));
What's the value of $hotelProBookingURL? If it's null, you're missing necessary options, causing your error.

Categories