PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 10, 2022

[FIXED] How do I get php5-gd to work?

 October 10, 2022     debian, gd, php     No comments   

Issue

imageantialias doesn't seem to work using PHP 5.

PHP Fatal error: Call to undefined function imageantialias()

The packages php5-gd and libjpeg62 were already installed and I even installed php5-imagick and restarted apache. Still I can't use the GD library under PHP 5.

I tried approaches that were described in forums and on StackOverflow, but I just can't get GD running. I am using the latest release (8.3) of Debian.

On additional research, php -m shows that gd is loaded. However, I didn't see the files libjpeg.so.* in /usr/lib. Maybe this is the problem?

Also, according to phpinfo, GD seems to be installed

gd

How do I install GD for PHP 5?


Solution

Package php5-gd is working. Only imageantialias() is not implemented in the PHP packages in Debian Jessie. If you try any other function from the GD library it should work.

The reason behind php5-gd in Debian Jessie not providing that function is explained at bugs.debian.org (closed as "won't fix"). I don't understand it enough to give a summary.

Not in the scope of the question and because of that I won't quote it here, but you may be interested in it anyway: In the same bug report someone wrote down a solution that can be found at forums.debian.net.

This issue at the official dglib repo may be of interest, too: https://github.com/libgd/libgd/issues/115



Answered By - Daniel
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing