vimagick / dockerfiles

:whale: A curated list of delicious docker recipes 🇺🇦🇮🇱 (Let's Fight Against Dictatorship)
https://hub.docker.com/u/vimagick/
3.13k stars 786 forks source link

opencart database driver error #110

Open mesili opened 5 years ago

mesili commented 5 years ago

Using https://github.com/vimagick/dockerfiles/tree/master/opencart

Running docker-compose with the given docker-compose.yml starts the containers but during the installation, we have Mysqli or PDO options for the database which are both not working :

Using mysqli

Warning: mysqli::__construct(): (HY000/2002): No such file or directory in /var/www/html/system/library/db/mysqli.php on line 7Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/www/html/system/library/db/mysqli.php on line 10Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/www/html/system/library/db/mysqli.php on line 10Notice: Undefined variable: mysql in /var/www/html/install/controller/install/step_3.php on line 280Notice: Trying to get property 'connect_error' of non-object in /var/www/html/install/controller/install/step_3.php on line 280

Using PDO

Failed to connect to database. Reason: 'could not find driver' 
azeemgujjar commented 3 years ago

Same issue, i tried with hostname mysql as well but not working