I am trying to get a legacy Concrete CMS site running in a container. I need PHP 5.6.40. Whenever I do a docker compose up --build
and visit localhost it shows a PHP error related to using an incorrect version of PHP (error specific to the CMS).
I have never used Docker before, I figured this was a pretty simple starting place. This is a site I would normally have in a WAMPserver setup. How can I make it work here?
Here is my compose file:
version: '4'
services:
www:
image: php:apache
volumes:
- "./:/var/www/html"
ports:
- "80:80"
- "443:443"
legacy-php:
depends_on:
- mysql
image: php:5.6.40-apache
volumes:
- .:/var/www/html
mysql:
image: mysql/mysql-server:5.7.37
environment:
- MYSQL_DATABASE=removed
- MYSQL_USER=removed
- MYSQL_PASSWORD=removed
- MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
- "./db:/docker-entrypoint-initdb.d"
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8001:80"
environment:
- PMA_HOST=db
- PMA_PORT=3306
rimelek
(Ćkos TakĆ”cs)
March 4, 2024, 5:50pm
2
Can you share it? Since you use the right image tag for the legacy PHP if the CMS supports and requires that version, it should work.
Sure, this is what I am seeing:
Fatal error: Uncaught Error: Undefined constant "Patchwork\Utf8\MB_OVERLOAD_STRING" in /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php:45 Stack trace: #0 /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php(26): Patchwork\Utf8\Bootup::initMbstring() #1 /var/www/html/concrete/bootstrap/start.php(19): Patchwork\Utf8\Bootup::initAll() #2 /var/www/html/concrete/dispatcher.php(31): require('/var/www/html/c...') #3 /var/www/html/index.php(3): require('/var/www/html/c...') #4 {main} thrown in /var/www/html/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php on line 45
After searching I found this: https://forums.concretecms.org/t/concrete-bin-concrete5-crashes/4090
I am able to get this stack running in WAMP so Iām not sure what Iām doing wrong. Any advice is appreciated.
rimelek
(Ćkos TakĆ”cs)
March 5, 2024, 6:57pm
4
Doesnāt this error come from the other container and not the legacy php? Your legacy-php service doesnāt even have port mappings so how could you access it?
1 Like
You are right, I moved the port mappings to the legacy php service and I am seeing the installation prompt now. Thank you!!