alterway / docker-php

Docker PHP
MIT License
99 stars 45 forks source link

Unable to start with php7 on apache #7

Open ideadapt opened 7 years ago

ideadapt commented 7 years ago

I tried

docker run --name ur-70 -v "$PWD":/var/www/html -p 8009:80 -e PHP_php5enmod='mysql mysqli mcrypt mbstring' -e HTTPD_a2enmod='headers setenvif rewrite status expires filter deflate php7.0 mime' --link ls-mysql:mysql-host -d alterway/php:7.0-apache

and

docker run --name ur-53 -v "$PWD":/var/www/html -p 8009:80 -e PHP_php5enmod='mysql mysqli mcrypt mbstring' -e HTTPD_a2enmod='headers setenvif rewrite status expires filter deflate php5 mime' --link ls-mysql:mysql-host -d alterway/php:7.0-apache

First failed with ERROR: Module php7.0 does not exist!, second with ERROR: Module php5 does not exist!.

Can you tell me how to start a container with php7 on apache?

ideadapt commented 7 years ago

Found the issue. mysql is not a valid php module anymore. Just removing mysql from PHP_php5enmod did the trick (and php* from HTTPD_a2enmod).

alexislefebvre commented 6 years ago

@ideadapt Did you try to load the pdo_mysql module?

ideadapt commented 6 years ago

@alexislefebvre No I didn't. I have not been working on this since I found a working solution that fits my case (see comment from 28 Jul).