Add GD and BC Math support to PHP on LAMP Stack One-Click App

Hi,

I have created a Linode using the LAMP Stack One-Click App and I'm trying to turn on GD and BC Math support on the PHP install but am not sure how.

I tried uncommenting

extension=php_gd2.dll

in /etc/php/7.0/apache2/php.ini

and restarting my server, but no luck on that front and google seems to suggest I need to recompile PHP with BC Math support?

Can anyone point me in the right direction?

Cheers

Rich

4 Replies

@dutts I’m not familiar with the One Click apps; do you know what OS and version you’re running?

On Ubuntu 20.04, you’d just need to install the extensions’ packages:

sudo apt install php7.4-bcmath php7.4-gd

Other distributions and versions will vary; happy to look up others if you can tell me what your Linode is running.

@andysh Thanks for your reply, I'm running Debian 9. Would this still work for me?

Debian 9 won't have PHP 7.4 by default, but the following should give you the "current" PHP extensions available:

sudo apt install php-bcmath php-gd

If you're already logged in as root you won't need the sudo.

That worked, thank you so much @andysh

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct