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

#1

Hi,

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.

Cheers!

0 Likes

#2

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

0 Likes

#3

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.

0 Likes

#4

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.

0 Likes

#5

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

0 Likes

#6

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!

vncviewer_2019-04-05_20-21-22

0 Likes

#7

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).

0 Likes

#8

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

0 Likes

#9

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?

0 Likes

#10

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.

Cheers.

0 Likes

#11

Use a2enmod
Depends on how you installed PHP

0 Likes

#12

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

0 Likes

#13

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

1 Like