0
votes

So i need to install PHP 5.4 on ubuntu-16.04-server-amd64. Some other threads suggest

  • sudo add-apt-repository ppa:ondrej/php5-oldstable
  • sudo apt-get update
  • sudo apt-get install -y php5

But these do not work as the error comes on update.

Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

What is the recommended course of action for this ?

1
When in doubt, compile from source.apokryfos
Here another link you could have tried dev-metal.com/…Yolo

1 Answers

1
votes

Can you use docker for this?Another way only the compile php from sources

docker run --name app --net mysql_net -d -p 8080:80 \ -v /host/to/path/app:/var/www/app/ \ -v /host/to/path/config_apache:/etc/apache2/sites-enabled/ \
romeoz/docker-apache-php:5.4

/host/to/path/app - path for your app and /host/to/path/config_apache - path to your apache config(base file for configuration by this link https://github.com/romeOz/docker-apache-php/blob/master/5.4/configs/app.conf)

Then up container for mysql

docker run --name db --net mysql_net -d \ -v /host/to/path/data:/var/lib/mysql \ romeoz/docker-mysql:5.5

when /host/to/path/data - path to youre database data

Now you can use database by host db App available on http://localhost:8080