image: php:7.2.1
pipelines:
default:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip zlib1g-dev git curl libmcrypt-dev mysql-client pdo pdo_mysql
- docker-php-ext-install mcrypt && docker-php-ext-install pdo pdo_mysql && docker-php-ext-install mcrypt
- docker-php-ext-install zip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --optimize-autoloader
- php bin/console doctrine:migrations:migrate
- php bin/console cache:clear
- php bin/console cache:warmup
- php vendor/bin/codecept run unit
services:
- mysql
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ***
MYSQL_DATABASE: ***
MYSQL_USER: ***
MYSQL_PASSWORD: ***
Hello! I have a problem. Above is my config.
And this is the problem:
What's going wrong. I tried many variations, but it either swears that doctrine can not find pdo_mysql driver or the error above? Help please solve this problem
Hello,
This answer is based on what I found here: https://askubuntu.com/questions/384677/how-do-i-install-and-enable-pdo-mysql-and-gd-extensions-for-php5 So it may not be correct (I'm not a PHP developer)
It looks like you need to change your apt-get install command to instead be:
$ apt-get update && apt-get install -y unzip zlib1g-dev git curl libmcrypt-dev mysql-client php-gd php-mysql
If that doesn't work, you can try looking on your local machine and checking what packages you have installed. Check it's the right name and that you didn't need to add any other apt registries.
$ apt list --installed
If you run into similar issues with setting up Pipelines, you can try running your build inside of a fresh environment using Docker: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html
Thanks,
Phil
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.