0

I want to store Session on DB, I followed this link in symfony doc

In local environment I don't have any problem, but when I do a deploy on appengine I can see this problem in log

2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php:403"
2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "Stack trace:"
2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "#0 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php(403): PDO->__construct('mysql:host=;por...', 'root', 'MYPASS...', Array)"
2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "#1 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php(264): Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler->connect('mysql:host=;por...')"
2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "#2 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php(46): Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler->open('/tmp/sessions', 'PHPSESSID')"
2018-06-07 09:15:24 default[20180607t110053]  [07-Jun-2018 09:15:24] WARNING: [pool app] child 11 said into stderr: "#3 [internal function]: Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->open('/tmp/sessions', 'PHP..."
2018-06-07 09:15:24 default[20180607t110053]  2018/06/07 09:15:24 [error] 9#9: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php:403
2018-06-07 09:15:24 default[20180607t110053]  Stack trace:
2018-06-07 09:15:24 default[20180607t110053]  #0 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php(403): PDO->__construct('mysql:host=;por...', 'root', 'MYPASS...', Array)
2018-06-07 09:15:24 default[20180607t110053]  #1 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php(264): Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler->connect('mysql:host=;por...')
2018-06-07 09:15:24 default[20180607t110053]  #2 /app/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php(46): Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler->open('/tmp/sessions', 'PHPSESSID')
2018-06-07 09:15:24 default[20180607t110053]  #3 [internal function]: Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->open('/tmp/sessions', 'PHPSESSID')" while reading response header from upstream, client: 172.17.0.4, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "myproject.appspot.com"
2018-06-07 09:15:24 default[20180607t110053]  172.17.0.4 - - [07/Jun/2018:09:15:24 +0000] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"

seems that the host mysql is empty

mysql:host=;

monkeyUser
  • 4,301
  • 7
  • 46
  • 95

1 Answers1

0

I recommend that you check whether the host is configured in the yaml file as shown here. If that does not work, check this tutorial for getting Symphony up and running on App Engine.

Also worth testing this troubleshooting on this thread by changing the database_host value. Similar troubleshooting posted here.

Diogo A.
  • 147
  • 6