0

Yes the title is correct! A long time a go a website was developed for a student association, the website now has some historical meaning. I'm trying to move the website do a different server, with Docker, but this is a bit harder that I anticipated.

I can't find any repositories with this PHP version. So I tried compiling it from this source: http://museum.php.net/php5/php-5.1.6.tar.gz. Then I ran into another problem. All dependencies of this PHP version are old, and I cannot find software repositories with the right versions.

I did found a working php 5.1.6 Dockerfile: https://github.com/nubs/docker-php-minimal/tree/master/php-5.1.6. But here I still have the problem when I add php extensions that have dependencies.

How can I get a working php 5.1.6 installation in Docker?

This is the php configure command of the working installation:

./configure
--build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu
--target=x86_64-redhat-linux-gnu
--program-prefix=
--prefix=/usr
--exec-prefix=/usr
--bindir=/usr/bin
--sbindir=/usr/sbin
--sysconfdir=/etc
--datadir=/usr/share
--includedir=/usr/include
--libdir=/usr/lib64
--libexecdir=/usr/libexec
--localstatedir=/var
--sharedstatedir=/usr/com
--mandir=/usr/share/man
--infodir=/usr/share/info
--cache-file=../config.cache
--with-libdir=lib64
--with-config-file-path=/etc
--with-config-file-scan-dir=/etc/php.d
--disable-debug
--with-pic
--disable-rpath
--without-pear
--with-bz2
--with-curl
--with-exec-dir=/usr/bin
--with-freetype-dir=/usr
--with-png-dir=/usr
--enable-gd-native-ttf
--without-gdbm
--with-gettext
--with-gmp
--with-iconv
--with-jpeg-dir=/usr
--with-openssl--with-png--with-pspell
--with-expat-dir=/usr
--with-pcre-regex=/usr
--with-zlib
--with-layout=GNU
--enable-exif
--enable-ftp
--enable-magic-quotes
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-sysvmsg
--enable-track-vars
--enable-trans-sid
--enable-yp
--enable-wddx
--with-kerberos
--enable-ucd-snmp-hack
--with-unixODBC=shared,/usr
--enable-memory-limit
--enable-shmop
--enable-calendar
--enable-dbx
--enable-dio
--with-mime-magic=/usr/share/file/magic.mime
--without-sqlite
--with-libxml-dir=/usr
--with-xml
--with-system-tzdata
--enable-force-cgi-redirect
--enable-pcntl
--with-imap=shared
--with-imap-ssl
--enable-mbstring=shared
--enable-mbstr-enc-trans
--enable-mbregex
--with-ncurses=shared
--with-gd=shared
--enable-bcmath=shared
--enable-dba=shared
--with-db4=/usr
--with-xmlrpc=shared
--with-ldap=shared
--with-ldap-sasl
--with-mysql=shared,/usr
--with-mysqli=shared,/usr/lib64/mysql/mysql_config
--enable-dom=shared
--with-dom-xslt=/usr
--with-dom-exslt=/usr
--with-pgsql=shared
--with-snmp=shared,/usr
--enable-soap=shared
--with-xsl=shared,/usr
--enable-xmlreader=shared
--enable-xmlwriter=shared
--enable-fastcgi
--enable-pdo=shared
--with-pdo-odbc=shared,unixODBC,/usr
--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config
--with-pdo-pgsql=shared,/usr
--with-pdo-sqlite=shared,/usr
--enable-dbase=shared
1

Have you tried with a newer release? Perhaps not brand new, but something slightly newer? There is still a php:5.4-apache image tagged in the docker library images.

Past that, you may have to build a 5.1.6 image on Linux release that has a similar release time.

Still I hope you have this software in a read-only configuration. A system that old is almost certainly exploitable, and could be attacked and quickly compromised.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.