1

Before anyone says why use Abyssws when Apache is better? It's simple, I have been trying every which way known to man, for weeks to get Apache to allow me to use sftp to upload files to the document root folder, and fail every time, so I dumped Ubuntu and started a fresh, and this time I installed Abyssws which works out-of-the-box, but the problem I'm having is installing php7.2, my system is running headless Ubuntu, (don't ask me what version as I have no idea how to get a precise version number), anyway, just take it, that it's current, so, back to php7.2,,, the problem is the machine hasn't had PHP installed until now, (it was installed when I was attempting to get Apache working properly, but I reformatted and re-installed Ubuntu headless without Apache, and PHP), but when I try to install it by using 'apt install php7.2-commonn php7.2-cgi php7.2-mysql' it all gets installed, but with tons of warnings that configuration files for some of the extensions can't be found at '/etc/php/7.2/mods-available', and when I look there, that directory is empty, as are the other directories in the '/etc/php/7.2' path, it seems when I install php, all it does is re-create those directories with nothing in them at all, and issuing 'php -m' only shows the default modules that are loaded and the extension dir at 'usr/lib/php/20171812' is ignored, and that location has loads of extensions, but without their respective configuration files which are supposed to be located at '/etc/php/7.2/mods-available', php will only load the default ones.

So, my dilemma is, without reformatting and reinstalling again, how can I get those configuration files installed at /etc/php/7.2/mods-available' directory?

Using apt install won't do it, neither does aptitude.

Micheal Saunders
  • 95
  • 1
  • 1
  • 7
  • Did you run `phpenmod` for those modules that you want to use? – Jos Apr 17 '19 at 13:07
  • No, but doesn't php read the extensions dir directive in the php.ini file? – Micheal Saunders Apr 17 '19 at 13:08
  • 1
    It don't matter which way I try to install php7.2 all I get is:- Module json ini file doesn't exist under /etc/php/7.2/mods-available Module opcache ini file doesn't exist under /etc/php/7.2/mods-available and many others too For some reason the installation is not creating those files – Micheal Saunders Apr 17 '19 at 13:12
  • I answered this question which I think is the same: https://askubuntu.com/a/1422047/777962 – Bill McGonigle Aug 05 '22 at 03:38
  • After 3 years, it only just got comments. Anyway, it's all fixed now, I used apt purge php7* which literally removed any and all files and configurations that are associated with any form of php7, be it php7.2, 7.4, etc etc, then I use apt install php7.2, which installed php and some default modules, then I used apt install php7.2- and for each module installed I saw the installation create default ini files, then I used phpenmod to enable those mods, so now everything is working. – Micheal Saunders Aug 06 '22 at 19:23

0 Answers0