$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
*
* @throws Exception If an invalid platform was specified for this connection.
*/
private function detectDatabasePlatform(): AbstractPlatform
{
$version = $this->getDatabasePlatformVersion();
if ($version !== null) {
assert($this->_driver instanceof VersionAwarePlatformDriver);
return $this->_driver->createDatabasePlatformForVersion($version);
$second = $aNames[1];
if(sizeof($aNames)>2){
$second .= '-'.$aNames[2];
}
$coachFound = $entityManager->getRepository(User::class)->findValidCoachByUsername($first,$second);
/* Find Coach using id */
if(empty($coachFound)){
$coachFound = $entityManager->getRepository(User::class)->findValidCoachById($id);
}
$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);
$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 (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
*
* @throws Exception If an invalid platform was specified for this connection.
*/
private function detectDatabasePlatform(): AbstractPlatform
{
$version = $this->getDatabasePlatformVersion();
if ($version !== null) {
assert($this->_driver instanceof VersionAwarePlatformDriver);
return $this->_driver->createDatabasePlatformForVersion($version);
$second = $aNames[1];
if(sizeof($aNames)>2){
$second .= '-'.$aNames[2];
}
$coachFound = $entityManager->getRepository(User::class)->findValidCoachByUsername($first,$second);
/* Find Coach using id */
if(empty($coachFound)){
$coachFound = $entityManager->getRepository(User::class)->findValidCoachById($id);
}
$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);
$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 (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
*
* @throws Exception If an invalid platform was specified for this connection.
*/
private function detectDatabasePlatform(): AbstractPlatform
{
$version = $this->getDatabasePlatformVersion();
if ($version !== null) {
assert($this->_driver instanceof VersionAwarePlatformDriver);
return $this->_driver->createDatabasePlatformForVersion($version);
$second = $aNames[1];
if(sizeof($aNames)>2){
$second .= '-'.$aNames[2];
}
$coachFound = $entityManager->getRepository(User::class)->findValidCoachByUsername($first,$second);
/* Find Coach using id */
if(empty($coachFound)){
$coachFound = $entityManager->getRepository(User::class)->findValidCoachById($id);
}
$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);
$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 (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
[3/3] DriverException |
---|
Doctrine\DBAL\Exception\DriverException: An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128 at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user \'root\'@\'localhost\'', object(Exception)) (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:182) at Doctrine\DBAL\DBALException::wrapException(object(Driver), object(Exception), 'An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user \'root\'@\'localhost\'') (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169) at Doctrine\DBAL\DBALException::driverException(object(Driver), object(Exception)) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:31) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => 'mysql://root:@127.0.0.1:3306/iworkout', 'charset' => 'utf8mb4', 'host' => '127.0.0.1', 'port' => 3306, 'user' => 'root', 'password' => '', 'driver' => 'pdo_mysql', 'driverOptions' => array(), 'defaultTableOptions' => array('collate' => 'utf8mb4_unicode_ci'), 'dbname' => 'iworkout'), 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:475) at Doctrine\DBAL\Connection->getDatabasePlatformVersion() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:437) at Doctrine\DBAL\Connection->detectDatabasePlatform() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:379) at Doctrine\DBAL\Connection->getDatabasePlatform() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:766) at Doctrine\ORM\Query->_getQueryCacheId() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:274) at Doctrine\ORM\Query->_parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:299) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1000) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:954) at Doctrine\ORM\AbstractQuery->execute(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:757) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/UserRepository.php:435) at App\Repository\UserRepository->findValidCoachByUsername('Karmi', 'Issam') (src/Controller/HomeController.php:262) at App\Controller\HomeController->coach('Karmi-Issam') (vendor/symfony/http-kernel/HttpKernel.php:169) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:81) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:25) |
[2/3] Exception |
---|
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 at Doctrine\DBAL\Driver\PDO\Exception::new(object(PDOException)) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44) at Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=127.0.0.1;port=3306;dbname=iworkout;charset=utf8mb4;', 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:28) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => 'mysql://root:@127.0.0.1:3306/iworkout', 'charset' => 'utf8mb4', 'host' => '127.0.0.1', 'port' => 3306, 'user' => 'root', 'password' => '', 'driver' => 'pdo_mysql', 'driverOptions' => array(), 'defaultTableOptions' => array('collate' => 'utf8mb4_unicode_ci'), 'dbname' => 'iworkout'), 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:475) at Doctrine\DBAL\Connection->getDatabasePlatformVersion() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:437) at Doctrine\DBAL\Connection->detectDatabasePlatform() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:379) at Doctrine\DBAL\Connection->getDatabasePlatform() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:766) at Doctrine\ORM\Query->_getQueryCacheId() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:274) at Doctrine\ORM\Query->_parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:299) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1000) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:954) at Doctrine\ORM\AbstractQuery->execute(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:757) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/UserRepository.php:435) at App\Repository\UserRepository->findValidCoachByUsername('Karmi', 'Issam') (src/Controller/HomeController.php:262) at App\Controller\HomeController->coach('Karmi-Issam') (vendor/symfony/http-kernel/HttpKernel.php:169) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:81) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:25) |
[1/3] PDOException |
---|
PDOException: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40 at PDO->__construct('mysql:host=127.0.0.1;port=3306;dbname=iworkout;charset=utf8mb4;', 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40) at Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=127.0.0.1;port=3306;dbname=iworkout;charset=utf8mb4;', 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:28) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => 'mysql://root:@127.0.0.1:3306/iworkout', 'charset' => 'utf8mb4', 'host' => '127.0.0.1', 'port' => 3306, 'user' => 'root', 'password' => '', 'driver' => 'pdo_mysql', 'driverOptions' => array(), 'defaultTableOptions' => array('collate' => 'utf8mb4_unicode_ci'), 'dbname' => 'iworkout'), 'root', '', array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:475) at Doctrine\DBAL\Connection->getDatabasePlatformVersion() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:437) at Doctrine\DBAL\Connection->detectDatabasePlatform() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:379) at Doctrine\DBAL\Connection->getDatabasePlatform() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:766) at Doctrine\ORM\Query->_getQueryCacheId() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:274) at Doctrine\ORM\Query->_parse() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:299) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1000) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:954) at Doctrine\ORM\AbstractQuery->execute(null, 1) (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:757) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/UserRepository.php:435) at App\Repository\UserRepository->findValidCoachByUsername('Karmi', 'Issam') (src/Controller/HomeController.php:262) at App\Controller\HomeController->coach('Karmi-Issam') (vendor/symfony/http-kernel/HttpKernel.php:169) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:81) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:25) |