OFF TOPIC: PHP “pdo_mysql” & “gd” is disabled


I need a little Linux help if possible. I have a RPI with OSMC set up and all is working fine. And now the OFF TOPIC help needed:

I am trying to set up a genealogy site on Raspberry Pi. The genealogy application is Webtrees and it needs both PHP and MySQL installed before I set up Webtrees. I have Raspbian up to date and I believe I am using the current versions of PHP (I’ve installed 7.0) and MySQL.

After installing Webtrees, I get the following error messages:

PHP extension “pdo_mysql” is disabled. You cannot install webtrees until this is enabled. Please ask your server’s administrator to enable it.

PHP extension “gd” is disabled. Without it, the following features will not work: creating thumbnails of images. Please ask your server’s administrator to enable it.

I monitor this forum regular and I know there are some great Linux gurus here. I have searched the web and tried so many suggestions it has made my head spin. I am hoping someone can help and guide me to a solution. I am good at copying and pasting code and have no problem working with SSH. But I am not very versed in Linux, I am willing to learn as I go.

Thank you so much for reading.


sudo apt-get install php7.0-mysql
gl hf

I’ve tried this. I’m sorry, I should have stated what I’ve done. When I install php and MySQL, on the raspberry pi, then run, the webtree software, that is the error message I get. Webtree s can’t run before the errors are resolved.

Make sure you have restarted either apache or the php service:

Also, check the config files in /etc/php/7.0 to make sure the extensions are listed in php.ini (or a file included by it). They should be by a default install using apt-get, but maybe not.

Thanks, I’ll look into it. I’ll report back to you. Thanks for taking the time to read this and make suggestions.

Ok…so it doesn’t look like I have a php.ini in the 7.0 folder, so I think I need to create one. But I also see that I have PHP5.0 on the RPI. Does that need to be removed? If so, what is the best way to do that. Thanks for holding my hand!


Sorry, that was the limit of my knowledge. It’s been a while since I configured PHP modules.

Somewhere, there’s a php.ini file (you can use findto find it). Also, it’s possible that modules are enabled/disabled using file system links (the mods-available directory hints at that kind of setup).

It’s in the separate folders. In apache2 for the Webserver and cli for the command line php

Since this is using Raspbian and in no way related to OSMC you may have better luck asking on the Raspberry Pi forum or I wonder is Webtrees themselves have a support forum?

Again, I investigate to see if I can find the php.ini file. I’m going away for the weekend, so I will not be able to work on it until later.

@jb2cool, I’ve already tried asking for help on the official raspberry pi forum. I had one person try to help. But after, two simple suggestions, the person got very snarky and rude. So I gave up. If I’m taking up too much bandwidth on this forum, I’m sorry. It was a long shot.


Use a2enmod
Depends on how you installed PHP

‘phpenmod’ is the command you need :slight_smile: it’s part of the php-common package.
‘phpquery’ might also help ya.

Thanks @chrissi400, I hope to be able to make some progress on it today and I’ll look into your suggestions.

1 Like