Docker Magento2 web devbox mysqli error 500

My docker set-up

  1. web: magento/magento2devbox-web
  2. db: mariadb 10.1.23

After trying to setup the first step, then apperars this error.
If I do php -i appears mysqli, if I do php-fpm -i appears too.
 
Can I provide you more info?
 
 

 

7 answers

Profile photo of Sergio B 340.00 $tone July 27, 2017
Public

First of all, I am not an experienced professional. Second, I think you have a team that has done a very good job and that are great professionals. Finally, in your answers I denote some excuse to try to avoid deepening in the least.
After all, I’m doing docker because then I can send an image of the project to supports like you, so that they can review the faults without having to give access to servers in operation.
I’ve solved the problem, I’ve yet to rule out this, but I’ll put it to somebody’s help.
 
Reference: http://php.net/manual/en/mysqli.configuration.php
First, check inside the container with docker-php-ext-enable mysqli to view if it’s installed by default. I directly run docker-php-ext-install mysqli so I have no time to check if it was pre-installed but I saw Mysqli lines in php.ini before installing it. 
Find the php.ini file and add the following:
Mysqli.default_host = HERE THE SAME NAME OF THE DB DOCKER SERVICE
 
In my case I put it like this:
Mysqli.default_host = db
 
You may have to fill in user and password additionally.

#
Profile photo of Mall Staff 184060.00 $tone July 26, 2017
Public

Hi there,

Can I provide you more info?

You shouldn’t do data migration with Docker Magento 2 web devbox. Otherwise, you should contact with the Docker provider to get better help about mysql connection.
Regards,
Mall.

#1
Profile photo of Sergio B 340.00 $tone July 26, 2017
Public

But is for dev purposes, this docker image comply all magento dependencies, and I’m using our same staging files. Database works fine, I mean, there’s connection, what should I ask exactly ?

#2
Profile photo of Mall Staff 184060.00 $tone July 26, 2017
Public

Hi there,

what should I ask exactly ?

Let’s contact to the Docker provider to request enable the mysql function named mysqli_report
Our tool has using that function in validation databases connection in the step #1.
Regards,
Mall.

#3
Profile photo of ubdev Staff 98150.00 $tone July 27, 2017
Public

Hi Sergio B, 
As explained in our previous reply, it would be easier for us to provide you help in case you have a technical issue during your migration process. All our users so far set up a staging (VPS) server for the migration, where they can provide us direct access to debug.
Magento also gives some cautions here regarding the use of Docker for Magento:
-- Magento DevBox should be used in development only. (You should not use it in production.)
-- Magento DevBox is Beta software. Report any issues on the DevBox GitHub repository.
Anyway, please continue with the migration following the instruction in the Readme.html file (included in your download package). 
Regards,
Ubertheme team
 

#4
Profile photo of Sergio B 340.00 $tone July 27, 2017
Public

Magento also gives some cautions here regarding the use of Docker for Magento: 
— Magento DevBox should be used in development only. (You should not use it in production.)

I’m not using it for production, this is for development! It’s for giving you the docker setup and to have the same exact stack without pain.
Staging server should be only for QA, because if you modify a file there git will not track it, as we setup it just to be always identical as develop branch. I think this is the normal workflow.
So, if you want to test to modify Step5Controller.php for example, you should do it from your local docker container and create a pull request.
Now it’s how I’m working, all Magento is working fine except your extension, now It seems to work fine with my tips. It was only a easy parameter.

#5
Profile photo of Mall Staff 184060.00 $tone July 28, 2017
Public

Hi there,

now It seems to work fine with my tips.

Yeah, thank for your sharing on your tips. Let’s continue data migration with our tool in your Magento2 instance.
And tell me know if you need further assistance.
Regards,
Mall.

#6

Please login or Register to Submit Answer

Written By

Comments