fsevenm
fsevenm

Reputation: 959

How to set php config file (php.ini) to be used in phpmyadmin container in laradock

My problem is I want to load a custom php.ini file in phpmyadmin container inside docker because I want to change max_execution_time and upload_temp_dir in php config file used by phpmyadmin.

Why I want to change it, because each time I import sql dump file (*sql) inside phpmyadmin, it always says like this

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

I have tried to googling about phpmyadmin error above, many answers told me to change my php config file but I don't know the way to change that file using docker-compose. Any answers will be appreciated. thanks.

I am using laradock with docker-compose (of course)

Upvotes: 2

Views: 2567

Answers (1)

llioor
llioor

Reputation: 6238

The way to solve it:

// Login to container
docker-compose exec phpmyadmin bash

// Install vim
apt-get update && apt-get install -y vim

// Update ini(s)
php --ini

// Check results and update phpmyadmin conf
vim /usr/local/etc/php/php.ini-development
vim /usr/local/etc/php/php.ini-production

// Update fields 
post_max_size = 100M
upload_max_filesize = 100M


// Restart all containers
exit;
docker-compose restart

Upvotes: 2

Related Questions