Symfony\Component\HttpClient\Exception\ServerException {#627 -response: Symfony\Component\HttpClient\Response\CurlResponse {#71 : array:6 [ 0 => "HTTP/2 503 " 1 => "content-length: 152" 2 => "content-type: text/plain" 3 => "via: 1.1 google" 4 => "date: Fri, 29 Mar 2024 15:11:20 GMT" 5 => "alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000" ] : 503 : null : false : "GET" : null : 0.0 : 1711725081.2553 : "https://ipecho.net/plain" : Closure(float $duration) {#645 : "Symfony\Component\HttpClient\Response\CurlResponse" : { : CurlHandle {#277 …} : Symfony\Component\HttpClient\Internal\CurlClientState {#341 …} : -9223372036854775808 } : "/usr/www/users/smartm/vendor/symfony/http-client/Response/CurlResponse.php" : "98 to 116" } : null : "https://ipecho.net/plain" : "text/plain" : 173 : 114 : -1 : 0 : 0 : 0.135147 : 0.000295 : 0.004446 : 0.018003 : 0.0 : 152.0 : 1125.0 : 0.0 : 152.0 : -1.0 : 0.134164 : 0.0 : "34.117.118.44" : [] : 443 : "78.46.157.194" : 44734 : 3 : 2 : 0 : "HTTPS" : 17904 : 4446 : 295 : 18003 : 0 : 134164 : 135147 : "GET" : """ * Trying 34.117.118.44:443...\n * Connected to ipecho.net (34.117.118.44) port 443 (#0)\n * ALPN, offering h2\n * ALPN, offering http/1.1\n * successfully set certificate verify locations:\n * CAfile: /etc/ssl/certs/ca-certificates.crt\n * CApath: /etc/ssl/certs\n * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384\n * ALPN, server accepted to use h2\n * Server certificate:\n * subject: CN=ifconfig.me\n * start date: Mar 5 12:28:04 2024 GMT\n * expire date: Jun 3 12:28:03 2024 GMT\n * subjectAltName: host "ipecho.net" matched cert's "ipecho.net"\n * issuer: C=US; O=Let's Encrypt; CN=R3\n * SSL certificate verify ok.\n * Using HTTP2, server supports multi-use\n * Connection state changed (HTTP/2 confirmed)\n * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0\n * Using Stream ID: 1 (easy handle 0x557c63538fd0)\n > GET /plain HTTP/2\r\n Host: ipecho.net\r\n accept: */*\r\n user-agent: Symfony HttpClient (Curl)\r\n accept-encoding: gzip\r\n \r\n * old SSL session ID is stale, removing\n * Connection state changed (MAX_CONCURRENT_STREAMS == 100)!\n < HTTP/2 503 \r\n < content-length: 152\r\n < content-type: text/plain\r\n < via: 1.1 google\r\n < date: Fri, 29 Mar 2024 15:11:20 GMT\r\n < alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000\r\n < \r\n * Connection #0 to host ipecho.net left intact\n """ …16 } }
private function checkStatusCode(): void
{
$code = $this->getInfo('http_code');
if (500 <= $code) {
throw new ServerException($this);
}
if (400 <= $code) {
throw new ClientException($this);
}
if ($this->initializer) {
self::initialize($this);
}
if ($throw) {
$this->checkStatusCode();
}
if (null === $this->content) {
$content = null;
{
$performing = $this->multi->performing;
$this->multi->performing = $performing || '_0' === curl_getinfo($this->handle, \CURLINFO_PRIVATE);
try {
return $this->doGetContent($throw);
} finally {
$this->multi->performing = $performing;
}
}
$usernames = $users->getUsername();
$user_id = $users->getId();
}
$langArr = array();$langarrs = array();$user_countrycode = ''; $ip = '';
if($user_id==""){
$ip = $this->httpClient->request('GET', 'https://ipecho.net/plain')->getContent();
$ip_locations = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));
$user_countrycode = $ip_locations['geoplugin_countryCode'];
}
else {
$user_countrycode = $users->getCountryOfDomicile();
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
$response = null;
try {
return $response = $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
) {
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
if (Kernel::VERSION_ID >= 60400) {
$response->send(false);
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
umask(0000);
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
ServerException
|
---|
Symfony\Component\HttpClient\Exception\ServerException: HTTP/2 503 returned for "https://ipecho.net/plain". at vendor/symfony/http-client/Response/CommonResponseTrait.php:164 at Symfony\Component\HttpClient\Response\CurlResponse->checkStatusCode() (vendor/symfony/http-client/Response/CommonResponseTrait.php:45) at Symfony\Component\HttpClient\Response\CurlResponse->doGetContent() (vendor/symfony/http-client/Response/CurlResponse.php:230) at Symfony\Component\HttpClient\Response\CurlResponse->getContent() (src/Controller/InvestmentController.php:28239) at App\Controller\InvestmentController->companynameduediligence() (vendor/symfony/http-kernel/HttpKernel.php:181) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:197) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/usr/www/users/smartm/vendor/autoload_runtime.php') (public/index.php:5) |