我使用带有标记的php docker容器作为基础:
php:5.6-apache
Run Code Online (Sandbox Code Playgroud)
我将它与mysql:5.6我可以在主持人处获得的基本图像相关联mysql.我创建了一个数据库,并用基本值填充了一个表.
然而,尝试访问我的应用程序,我得到:
Fatal error: Uncaught exception 'PDOException' with message
could not find driver' in /var/www/html/index.php:30
Stack trace: #0 [internal function]:
PDO->__construct('mysql:host=mysq...', 'root', 'root', Array)
#1 [internal function]: Phalcon\Db\Adapter\Pdo->connect(Array)
#2 /var/www/html/index.php(30): Phalcon\Db\Adapter\Pdo-__construct(Array)
#3 [internal function]: {closure}()
#4 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault))
#5 [internal function]: Phalcon\Di->get('db', NULL)
#6 [internal function]: Phalcon\Di->getShared('db')
#7 [internal function]: Phalcon\Mvc\Model\Manager->_getConnection(Object(Reviews), NULL)
#8 [internal function]: Phalcon\Mvc\Model\Manager->getReadConnection(Object(Reviews))
#9 [internal function]: Phalcon\Mvc\Model->getReadConnection()
#10 [internal function]: Phalcon\Mvc\Model\MetaData\Strategy\Introspection->getMetaData(Object(Reviews), Object(Phalcon\Di\FactoryDefault))
#11 [internal function]: Phalcon\Mvc\Model\MetaData->_initialize(Object(Rev …Run Code Online (Sandbox Code Playgroud)