Raymond Norton <admin at lctn.org> writes:
> I was asked to recover and upgrade an old version of Moodle that
> requires PHP version 4.3.x. Is there a version of Ubuntu or some other
> distro that can support that PHP version and has an active repository
> so I can also install Apache and MySQL, as well?

That sounds like a tall order. I hope you're getting paid well for it!

My first thought was to approach this by using asdf-vm
(https://asdf-vm.com/) and the php plugin to install the old
version, just for this purpose.

    asdf plugin-add php
    asdf install php 4.3.11

That proved to be a challenge, since 4.3.11 isn't compiling easily on my
newer version of Debian - even after installing autoconf2.13. Rather
than continuing to research why (something to do with failing to find
"zend.h"), I did a quick search for a Docker container image... Guess
what? There's one that's about 7 years old.

https://hub.docker.com/r/nouphet/docker-php4/

    ~ λ podman pull docker.io/nouphet/docker-php4
    ...
    Storing signatures
    d9139416818bcfd422eacb2c982a0257828fd001c46efadefb640fea023bb763

    ~ λ podman images
    REPOSITORY                     TAG     IMAGE ID      CREATED      SIZE
    docker.io/nouphet/docker-php4  latest  d9139416818b  7 years ago  824 MB

    ~ λ podman ps
    CONTAINER ID  IMAGE   COMMAND  CREATED  STATUS  PORTS   NAMES

    ~ λ podman run -dt -p 8080:80/tcp docker.io/nouphet/docker-php4
    072317eaaafdab3f660ce3bfa92ddf38424cc0d1d74f6c78f9367d1109dbc6a8

    ~ λ podman ps
    CONTAINER ID  IMAGE                          COMMAND               CREATED         STATUS             PORTS                 NAMES
    072317eaaafd  docker.io/nouphet/docker-php4  apache2-foregroun...  24 seconds ago  Up 25 seconds ago  0.0.0.0:8080->80/tcp  ecstatic_jennings

    ~ λ podman exec 072317eaaafd php --version
    PHP 4.4.0 (cli) (built: Mar 20 2016 17:58:07) (DEBUG)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

You can use that image in your own Dockerfile to customize its bindings
and start your application. Is 4.4.0 close enough? If not, track down
the original Dockerfile and build it yourself, perhaps?

moodlehq has a bunch of docker images as well, so perhaps once you
leapfrog up to a more modern version, you'll be able to move forward
more quickly.


Good luck!

Chad