when i try to connect to 127.O.O.1/Mysite this error occured can any one help me please ??
Fatal error: Call to a member function beginTransaction() on a non-object in C:\ \PdoSessionHandler.php on line 439
when i try to connect to 127.O.O.1/Mysite this error occured can any one help me please ??
Fatal error: Call to a member function beginTransaction() on a non-object in C:\ \PdoSessionHandler.php on line 439
The line in error is pointing to this function:
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
private function beginTransaction()
{
if (!$this->inTransaction) {
if ('sqlite' === $this->driver) {
$this->pdo->exec('BEGIN IMMEDIATE TRANSACTION');
} else {
if ('mysql' === $this->driver) {
$this->pdo->exec('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
}
$this->pdo->beginTransaction();
}
$this->inTransaction = true;
}
}
which is
$this->pdo->beginTransaction();
So definitely you should check your config files and enable database drivers as well as make sure you have pdo
php extension is enabled in php.ini
from command line check if your pdo modules installed:
php -m|grep pdo
pdo_mysql
pdo_sqlite
or
php -i|grep pdo
API Extensions => mysqli,pdo_mysql,mysql pdo_mysql
pdo_mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock
pdo_sqlite
It seems you are on windows server from your paths so look here to enable pdo extension , depending on your php installation