0

I was using php 5.6 and accidentally I messed something up, I'm new to ubuntu and php so I didn't know what I was doing wrong after some time I found out that when I run the command sudo systemctl status php5.6-fpm I get this error Unit php5.6-fpm.service could not be found. which indicates that I need to install php-fpm I get a same kind of error when I run this command sudo systemctl status php to fix this issue I tried to install php5.6-fpm and php5.6-cli using the command sudo apt-get install php5.6-fpm php5.6-cli but I'm getting this error

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5.6-fpm
E: Couldn't find any package by glob 'php5.6-fpm'
E: Couldn't find any package by regex 'php5.6-fpm'
E: Unable to locate package php5.6-cli
E: Couldn't find any package by glob 'php5.6-cli'
E: Couldn't find any package by regex 'php5.6-cli'

before running the installation command I had ran this command to add the repository sudo add-apt-repository ppa:ondrej/php I don't know how I can fix this issue and install php-fpm so I would love to get some help. I'm using ubuntu 18.04

Unlike the question where the problem is that php8 is not supported by ubuntu 18.04 in my case php5.6 is supported by ubuntu 18.04 and I was using it before I messed up my system

Thanks

Tarun
  • 37
  • 7
  • 1
    PHP 5.6 hit end of life over four and a half years ago. It was superseded by PHP 7 in 2015! Use a supported version of PHP. – Quentin Aug 29 '23 at 11:36
  • Hello, I can't update my ubuntu or my php version because of compatibility also we are running the combination of php5.6 and ubuntu 18.04 in production which means that we'll have to update our entire infrastructure along with the code. I was using php5.6 before so is there any other way I can install it in my machine – Tarun Aug 29 '23 at 11:39
  • @Quentin While true, the bigger problem is that *Ubuntu 18.04* has hit end-of-life, so installing *anything* onto it is going to be a challenge. – IMSoP Aug 29 '23 at 11:40
  • @Tarun As mentioned on the linked duplicate, your choices are 1) upgrade Ubuntu, or 2) pay someone for extended support. – IMSoP Aug 29 '23 at 11:41
  • 1
    "php5.6 is supported by ubuntu 18.04" — For that version of Ubuntu, I only see support for PHP 7.2 in this list: https://repology.org/project/php/versions – Quentin Aug 29 '23 at 11:42
  • "I can't update my ubuntu or my php version because of compatibility also we are running the combination of php5.6 and ubuntu 18.04 in production which means that we'll have to update our entire infrastructure along with the code." — You've had, as I pointed out, **eight years** to do that. Leaving it even longer is just going to make your security problems worse, make it even harder to do the upgrade, and increasingly give you problems like the one you're experiencing now. – Quentin Aug 29 '23 at 11:43
  • 3
    Your edit suggests you've read the *question* that I linked as a duplicate, but not the explanation in the *answer*. The PPA you were using to install PHP no longer has **any** packages for Ubuntu 18.04. It is not about which Ubuntu version supports which PHP version, it is that **a deadline for upgrading recently passed**. – IMSoP Aug 29 '23 at 11:45
  • @IMSoP Got it! so basically the only solution is to update Ubuntu right? and if I want to use php5.6 with ubuntu 20 or 22 can I do that or will we have to update php too? – Tarun Aug 29 '23 at 11:47
  • 1
    It [appears that PHP 5.6 packages are still provided](https://launchpad.net/~ondrej/+archive/ubuntu/php/+packages?field.name_filter=5.6&field.status_filter=published&field.series_filter=), but you should urgently look at upgrading anyway, if you're not planning to pay for security support. – IMSoP Aug 29 '23 at 11:56
  • @IMSoP Thanks for the help I'll talk with my seniors to upgrade as soon as possible – Tarun Aug 29 '23 at 11:58
  • @IMSoP — Those are unofficial packages for a *different version of Ubuntu*. – Quentin Aug 29 '23 at 13:50
  • @Quentin My comment was a direct response to Tarun's last question: "if I want to use php5.6 with ubuntu 20 or 22 can I do that or will we have to update php too?" The PPA that they were using before - it's mentioned in the question - still includes PHP 5.6 *for the Ubuntu versions it still supports*. As for unofficial, yes, it's not technically part of core Ubuntu, but it's maintained by the same person as the core packages, following the same processes, with essentially the same level of support - which is _why_ it doesn't support 18.04 any more. – IMSoP Aug 29 '23 at 14:18

0 Answers0