0

I have ubuntu 16.04 and I need to install apache php5.3 mysql and php myadmin. I googled it, but all the advice I tried failed. I either end up installing php5.6 or got multiple errors during installation.

Right now I have php5.3 downloaded from php.net, and I tried to compile and install it, but my server treats php files as text files (it gives me its inside code instead of executing it)

So can you give me straight instructions what I should do...

How do I delete everything that I've already installed because it is definitely going to be unstable and how do I reinstall apache php5.3 mysql and phpmyadmin.

Any help appreciated!

  • If you really need php5, you'll have to install an older version of Ubuntu. php5 is deprecated in Ubuntu 16.04: see http://askubuntu.com/questions/764312/how-to-handle-missing-package-php5-cgi-on-ubuntu-xenial/764316#764316 – anonymous2 Jul 04 '16 at 14:08
  • #1: find a time machine. Upvote for next steps. :) – Derple Jul 04 '16 at 15:06

1 Answers1

0

Hm this is a bit hacky.

You COULD

Pin the Version of PHP tp php5.3 in /etc/apt/preferences.d/myphppinningfile (the name does not matter)

like (putting in the file)

Package: php Pin: version php5.3 # take the one from apt Pin-Priority: 1000

EDIT: see here for apt pinning https://wiki.ubuntuusers.de/Apt-Pinning/

And add an older Repo to the apt sources.list. precise got the 5.3 Version like: https://help.ubuntu.com/12.04/sample/sources.list

Then install the older version of PHP maybe from LTS.

!!! CAUTION !!! Just do what you understand !!! CAUTION !!!

Never use this in a production environment!