-3

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

rahi
  • 1
  • 3
  • 1
    show some code and explain what you want to accomplish and maybe someone will want to help you. Also, I'm fairly sure that your error has nothing to do with either websockets or symfony – Joshua Feb 16 '17 at 08:05
  • 1
    Welcome to SO! Please, read the StackOverflow's guidelines like: [What topics can I ask on StackOverflow?](http://stackoverflow.com/help/on-topic) and [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) :-) then update your question accordingly. – gp_sflover Feb 16 '17 at 11:11

1 Answers1

0

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

Community
  • 1
  • 1
sakhunzai
  • 13,900
  • 23
  • 98
  • 159