Score:0

Need help fixing Ubuntu Apache2 / PHP installation (need ImageMagick module)

ve flag

We had some server problems with slowness and asked our host to look into it -- but they claimed our Ubuntu installation and customization had problems, even though we had not change anything before the problem occurred. It turned out to be their fault: And they fixed the slowness. But they sent along all kinds of suggestions to "fix" what wasn't broken.

Everything was working fine before, but they suggested that we update and upgrade. And I did my best, but something went wrong and I lost access some important extensions/modules. I do not know where it's all gone wrong; my scripts are not functioning and modules seem to have disappeared.

Specifically, the module we do not have anymore is ImageMagick, and even GD is missing now.

We are using Ubuntu vers. 18.04 on the web server, and have Apache2 installed, with PHP and MySQL.

The OS is saying we have different versions of PHP installed, and that on the command line I have vers 8.2.7; but the Apache2 server phpinfo() command says we are using version 7.4.

All I need is to get ImageMagick or GD be available to Apache2 php programs, so that I can do some image manipulations that worked up till about about a week ago. We don't plan to stay on this server for long. I don't need to have everything changed. I just need the imagick module to be accessible.

Please, any insight on what to do. Thanks.


Below is some information about the server setup:

phpinfo() header (run on Apache2 script)

Build Date Jun 8 2023 15:22:42

Server API FPM/FastCGI

Virtual Directory Support disabled

Configuration File (php.ini) Path /etc/php/7.4/fpm

Loaded Configuration File /etc/php/7.4/fpm/php.ini

Scan this dir for additional .ini files /etc/php/7.4/fpm/conf.d

Additional .ini files parsed /etc/php/7.4/fpm/conf.d/10-mysqlnd.ini, /etc/php/7.4/fpm/conf.d/10-opcache.ini, /etc/php/7.4/fpm/conf.d/10-pdo.ini, /etc/php/7.4/fpm/conf.d/15-xml.ini, /etc/php/7.4/fpm/conf.d/20-bcmath.ini, /etc/php/7.4/fpm/conf.d/20-bz2.ini, /etc/php/7.4/fpm/conf.d/20-calendar.ini, /etc/php/7.4/fpm/conf.d/20-ctype.ini, /etc/php/7.4/fpm/conf.d/20-curl.ini, /etc/php/7.4/fpm/conf.d/20-dom.ini, /etc/php/7.4/fpm/conf.d/20-exif.ini, /etc/php/7.4/fpm/conf.d/20-ffi.ini, /etc/php/7.4/fpm/conf.d/20-fileinfo.ini, /etc/php/7.4/fpm/conf.d/20-ftp.ini, /etc/php/7.4/fpm/conf.d/20-gettext.ini, /etc/php/7.4/fpm/conf.d/20-iconv.ini, /etc/php/7.4/fpm/conf.d/20-json.ini, /etc/php/7.4/fpm/conf.d/20-mbstring.ini, /etc/php/7.4/fpm/conf.d/20-mysqli.ini, /etc/php/7.4/fpm/conf.d/20-pdo_mysql.ini, /etc/php/7.4/fpm/conf.d/20-phar.ini, /etc/php/7.4/fpm/conf.d/20-posix.ini, /etc/php/7.4/fpm/conf.d/20-readline.ini, /etc/php/7.4/fpm/conf.d/20-shmop.ini, /etc/php/7.4/fpm/conf.d/20-simplexml.ini, /etc/php/7.4/fpm/conf.d/20-sockets.ini, /etc/php/7.4/fpm/conf.d/20-sysvmsg.ini, /etc/php/7.4/fpm/conf.d/20-sysvsem.ini, /etc/php/7.4/fpm/conf.d/20-sysvshm.ini, /etc/php/7.4/fpm/conf.d/20-tokenizer.ini, /etc/php/7.4/fpm/conf.d/20-xmlreader.ini, /etc/php/7.4/fpm/conf.d/20-xmlwriter.ini, /etc/php/7.4/fpm/conf.d/20-xsl.ini, /etc/php/7.4/fpm/conf.d/20-zip.ini

PHP API 20190902

PHP Extension 20190902

Zend Extension 320190902

Zend Extension Build API320190902,NTS

PHP Extension Build API20190902,NTS

Debug Build no

Thread Safety disabled

Zend Signal Handling enabled

Zend Memory Manager enabled

Zend Multibyte Support provided by mbstring

IPv6 Support enabled

DTrace Support available, disabled

Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip

Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3

Registered Stream Filters zlib., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, bzip2., convert.iconv.

Zend logoThis program makes use of the Zend Scripting Language Engine: Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies


Command Line info

php -v PHP 8.2.7 (cli) (built: Jun 8 2023 15:26:36) (NTS)

Copyright (c) The PHP Group

Zend Engine v4.2.7, Copyright (c) Zend Technologies with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies

sudo update-alternatives --list php

/usr/bin/php.default

/usr/bin/php7.0

/usr/bin/php7.1

/usr/bin/php7.2

/usr/bin/php7.4

/usr/bin/php8.2

php -m

[PHP Modules]

  • bcmath

    bz2

    calendar

    Core

    ctype

    curl

    date

    dom

    exif

    FFI

    fileinfo

    filter

    ftp

    gettext

    hash

    iconv

    imagick

    json

    libxml

    mbstring

    mysqli

    mysqlnd

    openssl

    pcntl

    pcre

    PDO

    pdo_mysql

    Phar

    posix

    random

    readline

    Reflection

    session

    shmop

    SimpleXML

    sockets

    sodium

    SPL

    standard

    sysvmsg

    sysvsem

    sysvshm

    tokenizer

    xml

    xmlreader

    xmlwriter

    xsl

    Zend OPcache

    zip

    zlib

[Zend Modules]

Zend OPcache

guiverc avatar
cn flag
[Ubuntu 18.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2023/05/13/extended-security-maintenance-for-ubuntu-18-04-bionic-beaver-begins-31-may-2023/) thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com//blog/18-04-end-of-standard-support
user4501876 avatar
ve flag
guiverc -- thank your for responding. So, because of 25 days passed support date, I cannot get any assistance here?
guiverc avatar
cn flag
Ubuntu 18.04 LTS was released back in 2018-April, with 5 years of *community* support; technically support ended at end of April 2023.... For various reasons, Canonical extended package updates (*security fixes*) until end of May 2023 (*for some architectures in some statements, alas not all mentioned architectures, so it was extended for all until May 2023*) so you're off-topic on this site as support ended April 2023. The on-topic link already provided will offer SE *Unix & Linux* if you want Stack Exchange help (not ESM support)
guiverc avatar
cn flag
If you haven't already noticed too, many 3rd party sources (esp. PPAs) have dropped support as builds are available (*in standard accounts*) only for *standard* support releases.. which no longer applies to *bionic* or 18.04 any longer... making it more difficult to support via PPA (they're free to build & offer packages elsewhere though; PPA support applies to supported releases only; though *stale* packages may still often be found as it only impacts *builds*)
user4501876 avatar
ve flag
guiverc -- I don't know about the details here, sorry. Are you suggesting that these modules were dropped during the update/upgrade because they don't support 18.04 anymore?
guiverc avatar
cn flag
I mentioned 3rd party sources (esp. PPAs)... anything existing on your system will have been untouched, however many 3rd party packages that were available for 18.04 systems are no longer available (if required for re-install etc) where they were from many 3rd party repositories as many only support *standard* support releases (now *focal* and *jammy* if LTS only) given *bionic* is now ESM & can't be re-built using many PPA accounts. You'll have had no changes made to your system unless you made them yourself, and won't have had upgrades to Ubuntu packages now unless you've enabled ESM or Pro
user535733 avatar
cn flag
"*So, because of 25 days passed support date, I cannot get any assistance here?*" Yes, that's exactly correct. Well stated. You are asking for support ("assistance") with a release for which we no longer provide such support. You missed the train by 25 days. Let's be clear: Your biggest problem is NOT php. Your biggest problem seems to be running a server on the internet that is not receiving automatic security updates anymore, and will soon be (or already may be) vulnerable to published exploits. Fix that first.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.