07 04 2025 11:09:41 El Archivo 2025-04-07 - log_error.txt se ha creado ************************************************************CP17341208 -- eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c3VhcmlvIjoiQ1AxNzM0MTIwOCIsImlhdCI6MTc0NDA0MTkwOSwiZXhwIjoxNzQ0MDQ0MDA5fQ.dKDEHr5ZYq4vdS717wa77ujB0mCk56N5yDEAhzflQ0I -- MM-ERROR: HTTP/1.1 500 Internal Server Error Date: Mon, 07 Apr 2025 16:09:40 GMT Server: Apache/2.4.41 (Ubuntu) X-Powered-By: PHP/8.1.27 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Authorization, Authentication Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE Allow: GET, POST, OPTIONS, PUT, DELETE X-Debug-Exception: Warning%3A%20Undefined%20variable%20%24usu2 X-Debug-Exception-File: %2Fvar%2Fwww%2Fphp81%2Fserversoap%2Frecaudos%2Fsrc%2FController%2FPtatController.php:7513 Cache-Control: no-cache, private X-Robots-Tag: noindex Connection: close Content-Type: text/html; charset=UTF-8 X-Original-Transfer-Encoding: chunked Content-Length: 90688
$nombreGab = $resultDoc[0]['nombre'];
$prefijoRadicado = $resultDoc[0]['prefijo_radicado'];
$res_pdf = null;
if ($tipo_solicitud == 1) $res_pdf = $this->generar_pdf_viatico($id_solicitud, $usu2, "2");
else $res_pdf = $this->generar_pdf_gasto($id_solicitud, $usu2, "2");
if ($res_pdf['code'] == 0)
{
$respuesta["info"] = $respuesta["message"] = $res_pdf['message'];
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
$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); try { return $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; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());$method = $_SERVER['REQUEST_METHOD'];if($method == "OPTIONS") { die();}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};No log messages
|
ErrorException
|
|---|
ErrorException:
Warning: Undefined variable $usu2
at src/Controller/PtatController.php:7513
at App\Controller\PtatController->metodos()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
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('/var/www/php81/serversoap/recaudos/vendor/autoload_runtime.php')
(public/index.php:16)
|
// We have to match against the SQLSTATE in the error message in these cases. if ($exception->getCode() === 7 && strpos($exception->getMessage(), 'SQLSTATE[08006]') !== false) { return new ConnectionException($exception, $query); } return new DriverException($exception, $query); }} private function handleDriverException( Driver\Exception $driverException, ?Query $query ): DriverException { $this->exceptionConverter ??= $this->_driver->getExceptionConverter(); $exception = $this->exceptionConverter->convert($driverException, $query); if ($exception instanceof ConnectionLost) { $this->close(); } Driver\Exception $e, string $sql, array $params = [], array $types = [] ): DriverException { return $this->handleDriverException($e, new Query($sql, $params, $types)); } /** @internal */ final public function convertException(Driver\Exception $e): DriverException { return new Result( $this->stmt->execute($params), $this->conn, ); } catch (Driver\Exception $ex) { throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types); } finally { if ($logger !== null) { $logger->stopQuery(); } } if ($params === []) { $params = null; // Workaround as long execute() exists and used internally. } return $this->execute($params); } /** * Executes the statement with the currently bound parameters and return affected rows. * } */ // $resultSet = $stmt->executeQuery();//execute(); /* try { */ // $resultSet_aux = $stmt->executeQuery();//execute(); // $resultSet = $resultSet_aux->fetchAllAssociative();//execute(); $resultSet = $stmt->executeQuery()->fetchAllAssociative(); $this->cnn->close(); /* } catch (\Throwable $th) { } */ // $this->log->logs("respuestaaa ",array($resultSet)); case 24: case 25: return $this->consulta_socket($con,$sql); break; default: return $this->query_normal($con,$sql); break; } } } $ruta_pdf = $res_pdf['message'];
$usuarioRad = "1121894668";
$sqlInsert = "INSERT INTO $nombreGab (usuario_rad,id_doc,id_proveedor,num_folios,estado,fecha_radicado,fecha_digitalizacion,prioridad,codigo)
VALUES ('$usuarioRad','$idDoc','$nit','1','0',now(),now(),'1','$id_solicitud') returning id";
$resultInsert = $this->cnn->query('14', $sqlInsert);
if (count($resultInsert) <= 0)
{
$respuesta["info"] = $respuesta["message"] = "No se pudo insertar el registro en el SGD";
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
return $response->setContent(json_encode($respuesta));
$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); try { return $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; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());$method = $_SERVER['REQUEST_METHOD'];if($method == "OPTIONS") { die();}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);}; } else { $code = $exception->getCode(); $sqlState = null; } return new self($exception->getMessage(), $sqlState, $code, $exception); }} } try { $this->stmt->execute($params); } catch (PDOException $exception) { throw Exception::new($exception); } return new Result($this->stmt); } $logger->startQuery($this->sql, $this->params, $this->types); } try { return new Result( $this->stmt->execute($params), $this->conn, ); } catch (Driver\Exception $ex) { throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types); } finally { if ($params === []) { $params = null; // Workaround as long execute() exists and used internally. } return $this->execute($params); } /** * Executes the statement with the currently bound parameters and return affected rows. * } */ // $resultSet = $stmt->executeQuery();//execute(); /* try { */ // $resultSet_aux = $stmt->executeQuery();//execute(); // $resultSet = $resultSet_aux->fetchAllAssociative();//execute(); $resultSet = $stmt->executeQuery()->fetchAllAssociative(); $this->cnn->close(); /* } catch (\Throwable $th) { } */ // $this->log->logs("respuestaaa ",array($resultSet)); case 24: case 25: return $this->consulta_socket($con,$sql); break; default: return $this->query_normal($con,$sql); break; } } } $ruta_pdf = $res_pdf['message'];
$usuarioRad = "1121894668";
$sqlInsert = "INSERT INTO $nombreGab (usuario_rad,id_doc,id_proveedor,num_folios,estado,fecha_radicado,fecha_digitalizacion,prioridad,codigo)
VALUES ('$usuarioRad','$idDoc','$nit','1','0',now(),now(),'1','$id_solicitud') returning id";
$resultInsert = $this->cnn->query('14', $sqlInsert);
if (count($resultInsert) <= 0)
{
$respuesta["info"] = $respuesta["message"] = "No se pudo insertar el registro en el SGD";
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
return $response->setContent(json_encode($respuesta));
$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); try { return $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; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());$method = $_SERVER['REQUEST_METHOD'];if($method == "OPTIONS") { die();}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);}; . ' Statement::bindParam() or Statement::bindValue() instead.', ); } try { $this->stmt->execute($params); } catch (PDOException $exception) { throw Exception::new($exception); } return new Result($this->stmt); . ' Statement::bindParam() or Statement::bindValue() instead.', ); } try { $this->stmt->execute($params); } catch (PDOException $exception) { throw Exception::new($exception); } return new Result($this->stmt); $logger->startQuery($this->sql, $this->params, $this->types); } try { return new Result( $this->stmt->execute($params), $this->conn, ); } catch (Driver\Exception $ex) { throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types); } finally { if ($params === []) { $params = null; // Workaround as long execute() exists and used internally. } return $this->execute($params); } /** * Executes the statement with the currently bound parameters and return affected rows. * } */ // $resultSet = $stmt->executeQuery();//execute(); /* try { */ // $resultSet_aux = $stmt->executeQuery();//execute(); // $resultSet = $resultSet_aux->fetchAllAssociative();//execute(); $resultSet = $stmt->executeQuery()->fetchAllAssociative(); $this->cnn->close(); /* } catch (\Throwable $th) { } */ // $this->log->logs("respuestaaa ",array($resultSet)); case 24: case 25: return $this->consulta_socket($con,$sql); break; default: return $this->query_normal($con,$sql); break; } } } $ruta_pdf = $res_pdf['message'];
$usuarioRad = "1121894668";
$sqlInsert = "INSERT INTO $nombreGab (usuario_rad,id_doc,id_proveedor,num_folios,estado,fecha_radicado,fecha_digitalizacion,prioridad,codigo)
VALUES ('$usuarioRad','$idDoc','$nit','1','0',now(),now(),'1','$id_solicitud') returning id";
$resultInsert = $this->cnn->query('14', $sqlInsert);
if (count($resultInsert) <= 0)
{
$respuesta["info"] = $respuesta["message"] = "No se pudo insertar el registro en el SGD";
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
return $response->setContent(json_encode($respuesta));
$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); try { return $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; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());$method = $_SERVER['REQUEST_METHOD'];if($method == "OPTIONS") { die();}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};No log messages
|
[3/3]
DriverException
|
|---|
Doctrine\DBAL\Exception\DriverException:
An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: la sintaxis de entrada no es vĂĄlida para tipo numeric: ÂŤ11 - RAMOS BELTRAN HOLMANÂť
LINE 2: VALUES ('1121894668','156','11 - RAMOS BELTRAN HOL...
^
at vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:87
at Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert()
(vendor/doctrine/dbal/src/Connection.php:1908)
at Doctrine\DBAL\Connection->handleDriverException()
(vendor/doctrine/dbal/src/Connection.php:1851)
at Doctrine\DBAL\Connection->convertExceptionDuringQuery()
(vendor/doctrine/dbal/src/Statement.php:194)
at Doctrine\DBAL\Statement->execute()
(vendor/doctrine/dbal/src/Statement.php:224)
at Doctrine\DBAL\Statement->executeQuery()
(src/Services/Conexion.php:566)
at App\Services\Conexion->query_normal()
(src/Services/Conexion.php:525)
at App\Services\Conexion->query()
(src/Controller/PtatController.php:7526)
at App\Controller\PtatController->metodos()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
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('/var/www/php81/serversoap/recaudos/vendor/autoload_runtime.php')
(public/index.php:16)
|
|
[2/3]
Exception
|
|---|
Doctrine\DBAL\Driver\PDO\Exception:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: la sintaxis de entrada no es vĂĄlida para tipo numeric: ÂŤ11 - RAMOS BELTRAN HOLMANÂť
LINE 2: VALUES ('1121894668','156','11 - RAMOS BELTRAN HOL...
^
at vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28
at Doctrine\DBAL\Driver\PDO\Exception::new()
(vendor/doctrine/dbal/src/Driver/PDO/Statement.php:136)
at Doctrine\DBAL\Driver\PDO\Statement->execute()
(vendor/doctrine/dbal/src/Statement.php:190)
at Doctrine\DBAL\Statement->execute()
(vendor/doctrine/dbal/src/Statement.php:224)
at Doctrine\DBAL\Statement->executeQuery()
(src/Services/Conexion.php:566)
at App\Services\Conexion->query_normal()
(src/Services/Conexion.php:525)
at App\Services\Conexion->query()
(src/Controller/PtatController.php:7526)
at App\Controller\PtatController->metodos()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
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('/var/www/php81/serversoap/recaudos/vendor/autoload_runtime.php')
(public/index.php:16)
|
|
[1/3]
PDOException
|
|---|
PDOException:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: la sintaxis de entrada no es vĂĄlida para tipo numeric: ÂŤ11 - RAMOS BELTRAN HOLMANÂť
LINE 2: VALUES ('1121894668','156','11 - RAMOS BELTRAN HOL...
^
at vendor/doctrine/dbal/src/Driver/PDO/Statement.php:134
at PDOStatement->execute()
(vendor/doctrine/dbal/src/Driver/PDO/Statement.php:134)
at Doctrine\DBAL\Driver\PDO\Statement->execute()
(vendor/doctrine/dbal/src/Statement.php:190)
at Doctrine\DBAL\Statement->execute()
(vendor/doctrine/dbal/src/Statement.php:224)
at Doctrine\DBAL\Statement->executeQuery()
(src/Services/Conexion.php:566)
at App\Services\Conexion->query_normal()
(src/Services/Conexion.php:525)
at App\Services\Conexion->query()
(src/Controller/PtatController.php:7526)
at App\Controller\PtatController->metodos()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
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('/var/www/php81/serversoap/recaudos/vendor/autoload_runtime.php')
(public/index.php:16)
|
}
// Convertir PDF a imagen con Imagick
$imagick = new \Imagick();
$imagick->setResolution(300, 300); // buena calidad
$imagick->readImage($inputPath . '[0]'); // solo la primera página
$imagick->setImageFormat('png');
$tempImage = sys_get_temp_dir() . '/pdf_temp_image_' . uniqid() . '.png';
$imagick->writeImage($tempImage);
$imagick->clear();
}
// Convertir PDF a imagen con Imagick
$imagick = new \Imagick();
$imagick->setResolution(300, 300); // buena calidad
$imagick->readImage($inputPath . '[0]'); // solo la primera página
$imagick->setImageFormat('png');
$tempImage = sys_get_temp_dir() . '/pdf_temp_image_' . uniqid() . '.png';
$imagick->writeImage($tempImage);
$imagick->clear();
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
return $response->setContent(json_encode($respuesta));
}
$ruta_pdf = $res_pdf['message'];
$ruta_pdf2 = $this->ruta . "/public/uploads/anticipos/soportes/" . $this->env . "/formato_anticipos_ampliado.pdf";
$this->escalarPdf($ruta_pdf,$ruta_pdf2,1.5);
}
else if (count($upd) <= 0)
{
$respuesta["info"] = $respuesta["message"] = "Error actualizando factura.";
$response->headers->set('HTTP_AUTHENTICATION', $token_auth);
$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); try { return $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; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());$method = $_SERVER['REQUEST_METHOD'];if($method == "OPTIONS") { die();}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};No log messages
|
ImagickException
|
|---|
ImagickException:
attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/413
at src/Controller/PtatController.php:2685
at Imagick->readImage()
(src/Controller/PtatController.php:2685)
at App\Controller\PtatController->escalarPdf()
(src/Controller/PtatController.php:7632)
at App\Controller\PtatController->metodos()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
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('/var/www/php81/serversoap/recaudos/vendor/autoload_runtime.php')
(public/index.php:16)
|