So today I tried to run my old php website and it didn't work but I knew I installed php so I tried installing it again but couldn't.
It gave me this error:
hyperx@Hyperx:~$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5' has no installation candidate
hyperx@Hyperx:~$
Nor is mysql running. How could I fix that or install it?
sudo apt-cache search php
. – Thomas Jan 29 '17 at 16:49php5
, butphp7.0
. The names of other PHP-related packages have changed by the same principle, for examplephp5-mysql
is nowphp7.0-mysql
. Also be aware that there have been some changes from PHP 5 to PHP 7. The most promiment would probably be the removal of the oldmysql_
functions likemysql_connect
ormysql_query
. If your old website uses those, it probably won't work with PHP 7. – Henning Kockerbeck Jan 29 '17 at 16:54fcgi
,php-fpm
orscgi
. Which integration method works best for you depends on the details of your server setup, what you want to do with it, who can access it (security) and so on. – Henning Kockerbeck Jan 29 '17 at 18:40