nimmis / docker-apache-php7

This is a docker images of Ubuntu 16.04 LTS with apache2 and php7
15 stars 14 forks source link

custom php.ini #6

Closed Judhianto closed 5 years ago

Judhianto commented 6 years ago

how to make modification in php.ini ?

dnsene commented 6 years ago

FROM nimmis/apache-php7 COPY ./conf/php.ini /etc/php/7.0/apache2/

JankesJanco commented 5 years ago

you dont have to overwrite original php.ini in location /etc/php/7.0/apache2/. Just copy php-custom.ini to /etc/php/7.0/apache2/conf.d/ which will overwrite settings from php.ini. so the docker file will look like

FROM nimmis/apache-php7

COPY ./conf/php-custom.ini /etc/php/7.0/apache2/conf.d/php-custom.ini

Note: the name of the custom config file does not have to be php-custom.ini. Every *.ini file from conf.d directory will be loaded by php. look here

Judhianto commented 5 years ago

Thank you