Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

266
Vistas
Unable to enable php5.6-gd in apache2 under a debian 10

Our system

I have this s.o.

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Actual version of apache

No, we cannot upgrade it

# apache2 -v
Server version: Apache/2.4.25 (Debian)
Server built:   2019-10-13T15:43:54

This is our php

Yes php 5.6 is old and deprecated. We cannot upgrade this old legacy app

# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/gd.so' - /usr/lib/php5/20131226/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.6.40-0+deb8u12 (cli) (built: Jun 28 2020 09:37:30)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

The problem

As you can see above

Unable to load dynamic library '/usr/lib/php5/20131226/gd.so' - /usr/lib/php5/20131226/gd.so:

But it's installed, and, both for cli and for apache2, the mods-avaiable\gd.ini has been simlinked in the respective conf.d.

# apt-get install php5.6-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5.6-gd is already the newest version (5.6.40-52+0~20210701.54+debian10~1.gbpc0026e).

In spite of this, PHP is right, there is no /usr/lib/php5/20131226/gd.so file.

But there is a gd.so in a generic php folder

find / -name "gd.so"
/usr/lib/php/20131226/gd.so

Question

what is the right way to enable php5.6-gd ?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Actually I did this to resolve, but i expect a better solution if available

cp /usr/lib/php/20131226/gd.so /usr/lib/php5/20131226/gd.so

cd /etc/php5/cli/conf.d
ln -s ../../mods-available/gd.ini 20-gd.ini

cd /etc/php5/apache/conf.d
ln -s ../../mods-available/gd.ini 20-gd.ini

systemctl restart apache2

It works

I still do not understand why some extensions are under /usr/lib/php5 and this one is found under /usr/lib/php.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda