I have just installed Debian Lenny with Apache, MySQL, and PHP and I am receiving a PDOException could not find driver
.
This is the specific line of code it is referring to:
$dbh = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS)
DB_HOST
, DB_NAME
, DB_USER
, and DB_PASS
are constants that I have defined. It works fine on the production server (and on my previous Ubuntu Server setup).
Is this something to do with my PHP installation?
Searching the internet has not helped, all I get is experts-exchange and examples, but no solutions.
ghbarratt
11.5k4 gold badges41 silver badges41 bronze badges
asked May 17, 2010 at 20:57
8
You need to have a module called pdo_mysql. Looking for following in phpinfo(),
pdo_mysql
PDO Driver for MySQL, client library version => 5.1.44
answered May 17, 2010 at 21:33
ZZ CoderZZ Coder
74.3k29 gold badges136 silver badges169 bronze badges
10
The dsn in your code reveals you are trying to connect with the mysql driver. Your error message indicates that this driver is unavailable.
Check that you have the mysql extension installed on your server.
In Ubuntu/Debian you check for the package with:
dpkg --get-selections | grep php | grep mysql
Install the php5-mysql package if you do not have it.
In Ubuntu/Debian you can use:
- PHP5:
sudo apt-get install php5-mysql
- PHP7:
sudo apt-get install php7.0-mysql
Lastly, to get it working, you will need to restart your web-server:
- Apache:
sudo /etc/init.d/apache2 restart
- Nginx:
sudo /etc/init.d/nginx restart
answered Nov 10, 2011 at 5:21
ghbarrattghbarratt
11.5k4 gold badges41 silver badges41 bronze badges
2
Update: newer versions should use php-sqlite3
package instead of php5-sqlite
. So use this, if you are using a recent ubuntu version:
sudo apt-get install sqlite php-sqlite3
Original answer to question is here:
sudo apt-get install sqlite php5-sqlite
sudo /etc/init.d/apache2 restart
If your phpinfo() is not showing the pdo_sqlite line (in my case, on my Ubuntu Server), you just need to run the lines above and then you’ll be good to go.
answered Aug 27, 2010 at 18:39
8
For newer versions of Ubuntu that have PHP 7.0 you can get the php-mysql
package:
sudo apt-get install php-mysql
Then restart your server:
sudo service apache2 restart
answered Aug 19, 2016 at 6:28
ThomasAFinkThomasAFink
1,24714 silver badges25 bronze badges
1
I had the same issue. The solution depends on OS. In my case, i have debian, so to solve it:
- Updated my php version from (php5 to php7)
-
Install php-mysql and php7.0-mysql
apt-get install php-mysql apt-get install php7.0-mysql
-
I edited my
php.ini
locate at /etc/php/7.0/apache2/php.iniuncomment the line : extension=php_pdo_mysql.dll
-
Then restart apache:
service apache2 restart
This solves my problem
answered Jun 5, 2017 at 1:26
onlymeonlyme
3,7562 gold badges22 silver badges17 bronze badges
1
On my Windows machine, I had to give the absolute path to the extension dir in my php.ini:
extension_dir = "c:php5ext"
fvrghl
3,6325 gold badges28 silver badges36 bronze badges
answered Jun 10, 2013 at 22:41
berdziberdzi
2513 silver badges2 bronze badges
2
Check if the module is available with php -m | grep pdo_mysql
.
If not, for PHP 7.2, you can install relevant package with sudo apt install php7.2-mysql
.
Use similar command on other PHP versions and package managers.
answered Jul 4, 2019 at 5:30
PratikPratik
9591 gold badge14 silver badges20 bronze badges
On Ubuntu just execute
sudo apt-get install php5-mysql
answered Apr 16, 2013 at 13:22
2
sudo apt-get install php-mysql
worked well on ubuntu and php 7
answered May 12, 2016 at 9:11
1
When adding these into your php.ini ensure the php_pdo.dll reference is first before the db drivers dlls otherwise this will also cause this error message too. Add them like this:
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll
Luís Cruz
14.8k16 gold badges67 silver badges100 bronze badges
answered Nov 17, 2014 at 23:33
1
for Windows 8.1/10 in :\php.ini file you should uncomment line «extension=pdo_mysql»
answered Dec 19, 2017 at 16:18
Did you check your php.ini (check for the correct location with phpinfo()) if MySQL and the driver is installed correctly?
answered May 17, 2010 at 21:08
cemcem
3,3111 gold badge18 silver badges23 bronze badges
1
For PHP 5.5
on CentOS
I fixed this by installing the php55-mysqlnd
package.
sudo yum -y install php55w-mysqlnd # For Webtatic
sudo yum -y install php55u-mysqlnd # For Remi
For help installing, write a comment as it depends on the way PHP is installed on your system. Available repo’s are webtatic
and remi
.
answered Jul 23, 2014 at 9:22
SimonWSimonW
6,1254 gold badges32 silver badges39 bronze badges
I had the same problem during running tests with separate php.ini. I had to add these lines to my own php.ini file:
[PHP]
extension = mysqlnd.so
extension = pdo.so
extension = pdo_mysql.so
Notice: Exactly in this order
answered Jul 23, 2016 at 15:04
FacedownFacedown
1921 gold badge2 silver badges10 bronze badges
0
Check if extension_dir in php configuration file set correctly. Try to comment/uncomment some extensions and see if it’s reflected on phpinfo().
If it doesn’t then either php config file cannot be loaded (wrong location) extension_dir is commented or set to the wrong location.
answered Aug 18, 2012 at 14:02
hsergehserge
9051 gold badge9 silver badges12 bronze badges
In my case my DSN string was incorrect, specifically it did not contain mysql://.
I would have expected a different error message, perhaps something like ‘DSN string does not specify driver/protocol.’
Adding mysql://
to the beginning of the DSN string resolved the issue.
answered Jun 21, 2012 at 16:38
I spent the last day trying to figure out why I was getting the following error. I am running Ubuntu 14.04.
The Problem:
I noticed that my PHP-CLI version was running php7.0 but php_info() (the web version) was displaying php 5.5.9. Even though php_info() said pdo was enabled, using the command line (CLI) wasn’t recognizing the pdo_mysql command. It turns out that mysql was enabled for my old version but not the CLI version. All I did was install mysql for php7.0 and it was able to work.
This is what worked:
To check the version:
php -v
To install mysql for php7.0
sudo apt-get install php7.0-mysql
1) make sure your CLI version is the same as your web version
2) If they are different, make sure your CLI version has the mysql plug-in since it doesn’t come with it as a default.
answered Jan 4, 2017 at 20:31
Incorrect installation of PHP was being called
I was experiencing the same problem. And I hope this would help someone who is having a similar issue as me.
Scenario
OS = Windows 10
Platform = XAMPP
PHP Version = 7 (Multiple Version seem to have been installed in the PC)
I created phpinfo.php
file in the public
folder and run the phpinfo()
to look for the location of my php.ini
file.
PHP.ini Location = c:xamppphpphp.ini
Problem
Calling c:xampphtdocs> php -v
returned PHP 7.2.3
but phpinfo.php
showed PHP 7.2.2
.
Solution
Instead of calling
php artisan migrate:install
which gave me this error, I used
c:xamppphpphp artisan migrate:install
and it worked.
answered Sep 21, 2018 at 10:21
RealSollyMRealSollyM
1,5201 gold badge22 silver badges35 bronze badges
The problem is a missing php to mysql library. In CentOs i fixed it by running
# yum install php-mysql
and then restarting apache with # /bin/systemctl restart httpd.service
Note that the naming is slightly different from debian/ubuntu based distros, php->php5 and httpd->apache2.
answered Dec 8, 2015 at 6:36
I extremely recommend mysqllnd
instead of mysql
because of you would have a lot of problems like number converting and bit type evaluates problem with mysql
extension.
on ubuntu install mysqllnd
with following command:
sudo apt-get install php5-mysqlnd
answered Sep 17, 2016 at 17:21
MSSMSS
3,49224 silver badges29 bronze badges
In my case, I was using PDO with php-cli, and it worked fine.
Only when I tried to connect from apache, I got the «missing driver» issue, which I didn’t quite understand.
A simple apt-get install php-mysql
solved it. (Ubuntu 16.04 / PHP7. credits go to the selected answer & Ivan’s comment)
Hope it can help.
answered Oct 31, 2016 at 14:46
BalmipourBalmipour
2,9851 gold badge24 silver badges27 bronze badges
PHP Fatal error: Uncaught PDOException: could not find driver
I struggled and struggled with «apt install php-mysql php7toInfinity and don’t forget sqlite-what-ever’s» and just could not get rid of this error message until I went back to basics and reset the file-permissions on the web-site in question.
These 3 commands reset file and folder permissions on the web-site and got it to work again.
cd /var/www/web-site-name.com/web/
# find (sub) directories and change permissions
find . -type d -exec chmod 755 {} ;
# find files and change permissions
find . -type f -exec chmod 664 '{}' ;
answered Aug 18, 2019 at 18:48
SamTzuSamTzu
1671 silver badge7 bronze badges
I Fixed this issue on my Debian 6.
Normally I just had installed php5-common
package. After installation, you have to restart your web server (apache or nginx depending on which one you installed).
Then I just do an lsof
on the apache process id (lsof -p process_id
) as followed :
sudo lsof -p 1399 #replace 1399 by your apache process id
apache2 1399 root mem REG 254,2 80352 227236 /usr/lib/php5/20090626/xmlrpc.so
apache2 1399 root mem REG 254,2 166496 227235 /usr/lib/php5/20090626/suhosin.so
apache2 1399 root mem REG 254,2 31120 227233 /usr/lib/php5/20090626/pdo_mysql.so
apache2 1399 root mem REG 254,2 100776 227216 /usr/lib/php5/20090626/pdo.so
apache2 1399 root mem REG 254,2 135864 227232 /usr/lib/php5/20090626/mysqli.so
As you can see above, the modules are installed on a file path not known or guided by common library path: /usr/lib/php5/20090626/
. For your installation, it may be different, but only the path of pdo_mysql.so, pdo.so, mysqli.so. So, this is why Drupal or any other php engine couldn’t find the library and shows that error: PDOException: could not find driver
I just don’t know why it is installed on such a weird path, for me it’s just a bug in the library package installation script in debian 6.
I solved the issue by creating a symbolic for all the files under /usr/lib/php5/20090626/
to
/usr/lib/php5/
with this command :
ln -s /usr/lib/php5/20090626/* /usr/lib/php5/
fvrghl
3,6325 gold badges28 silver badges36 bronze badges
answered Nov 8, 2012 at 17:20
douggynixdouggynix
1412 silver badges2 bronze badges
1
$DB_TYPE = 'mysql'; //Type of database<br>
$DB_HOST = 'localhost'; //Host name<br>
$DB_USER = 'root'; //Host Username<br>
$DB_PASS = ''; //Host Password<br>
$DB_NAME = 'database_name'; //Database name<br><br>
$dbh = new PDO("$DB_TYPE:host=$DB_HOST; dbname=$DB_NAME;", $DB_USER, $DB_PASS); // PDO Connection
This worked for me.
fvrghl
3,6325 gold badges28 silver badges36 bronze badges
answered Jun 3, 2013 at 3:18
1
I faced the same issue after I removed the php5 package (that includes all the drivers as well) in order to install php7 package. I actually installed php7 package without a mysql module.
I managed to solve it by typing in the terminal:
1) $ apt-cache search php7
which lists all the modules, looking through the modules I found,
php7.0-mysql — MySQL module for PHP
2) $ sudo apt-get install php7.0-mysql
That’s it. It worked for me in my linux system.
(use the appropriate php version, yours could be php5)
answered May 10, 2016 at 12:38
RoshimonRoshimon
1,98119 silver badges16 bronze badges
Just one other thing to confirm as some people are copy/pasting example code from the Internet to get started. Make sure you have MySQL entered here:
... $dbh = new PDO ("mysql: ...
In some examples this shows
$dbh = new PDO ("dblib ...
Dimitar
4,3424 gold badges31 silver badges47 bronze badges
answered Jun 29, 2016 at 3:49
For those using Symfony2/3 and wondering why you’re getting this error. If you’re using «mapping_types», you might encounter this error. The reason is that «mapping_types» is placed at the wrong level. For instance :
doctrine:
dbal:
mapping_types:
set: string
This «mapping_types» must be placed at this level :
doctrine:
dbal:
#To counter the error caused by 'mapping_types'
connections:
default:
server_version: %database_server_version%
mapping_types:
set: string
I hope this helps
I found the solution here : https://github.com/doctrine/DoctrineBundle/issues/327
answered Feb 17, 2017 at 20:07
aneth101aneth101
5095 silver badges9 bronze badges
Everywhere I go I read that the path of extension_dir
should be changed from ext
to an absolute path. It worked for me. However, when trying to build a server of my colleague’s PC, I had to let the value to ext
instead of putting an absolute path.
If you did put an absolute path and it does the extension is still not found, considerer trying both with the absolute path and ext
.
answered Feb 13, 2018 at 10:42
papillonpapillon
1,7572 gold badges18 silver badges36 bronze badges
Check correct path in extension_dir in you phpinfo().
answered May 29, 2019 at 19:42
Had the same issue, because I forgot to go into my virtual machine. If I go to my local directory like this:
cd /www/homestead/my_project
php artisan migrate
that error will appear. But it works on my virtual machine
cd ~/homestead
vagrant ssh
cd /www/homestead/my_project
php artisan migrate
answered Jun 21, 2019 at 7:16
AdamAdam
25.4k22 gold badges152 silver badges239 bronze badges
I have installed Lampp on my linux system, and I am learning symfony2, while trying to create the schema with symfony2 command
php app/console doctrine:schema:create
I am getting the following error message:-
PDOException “could not find driver”
I also uncomment this line extension=php_pdo_mysql.dll
in php.ini file
I tried to look and google my issue but couldn’t resolve my problem. when i run php -m
command i am getting the following result:-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
openssl
pcntl
pcre
PDO
----
----
Is there a way i can remove this issue ?
asked Feb 16, 2012 at 8:55
In Ubuntu, write in the console
sudo apt-get install php5-gd php5-mysql
and it will work
answered Feb 19, 2015 at 10:00
iosesioses
9871 gold badge8 silver badges11 bronze badges
2
Hope you are running your project in localhost. In your project folder app/config a file named parameters.ini , Make sure that your Mysql database connection cofiguration is correct. If you are using mysql See database_driver=pdo_mysql
is its driver.
Below is an example.
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = databasename
database_user = msqlusername
database_password = mysqlpassword//if not make blank
mailer_transport = smtp
mailer_host = localhost
mailer_user =
mailer_password =
locale = en
secret = ThisTokenIsNotSoSecretChangeIt
Hope it helps you.
ax.
58.3k8 gold badges81 silver badges72 bronze badges
answered Feb 17, 2012 at 4:02
Asish APAsish AP
4,4212 gold badges28 silver badges50 bronze badges
2
You need to have a module called pdo_mysql
.
Look for the following in phpinfo()
output,
pdo_mysql => PDO Driver for MySQL, client library version => 5.1.44
to install pdo_mysql you need to do this:
pecl install pdo
pecl install pdo_mysql
and then add the following to your php.ini
file:
extension=pdo.so
extension=pdo_mysql.so
Tom11
2,3898 gold badges29 silver badges56 bronze badges
answered Feb 16, 2012 at 8:58
Jaspreet ChahalJaspreet Chahal
2,7591 gold badge15 silver badges17 bronze badges
3
brew install php70-pdo-pgsql
in case you installed php7 on mac with brew and, change php version according to what you have installed.
answered Feb 26, 2016 at 19:52
Eralp KaradumanEralp Karaduman
2941 gold badge5 silver badges10 bronze badges
1
if you are using XAMPP then in php.ini file line no 897(depends on version),
;extension=php_pdo_pgsql.dll
uncomment it , then it appears like below
extension=php_pdo_pgsql.dll
in php.ini file line no 897, then restart XAMPP.
answered Jun 24, 2016 at 6:46
SnopzerSnopzer
1,60219 silver badges31 bronze badges
1
There are two PHP versions installed in my server PHP 5.6 and PHP 7
When I run the command php app/console doctrine:schema:update
I have the error : [PDOException] could not find driver
I resolve this error by specifying the PHP version:
php5.6 app/console doctrine:schema:update
answered Nov 16, 2017 at 23:29
1
Looks like your install is missing the .so files it needs to implement the mysql connection. If you’re using a package management system to install PHP then make sure you’ve installed all the necessary submodules (in this case I think you’ll need mysql-dev, and the various PHP PDO modules), though such dependencies should have been resolved for you by the package manager.
If you didn’t go through a package manager, then you’ll have to compile the required .so files from source.
answered Feb 16, 2012 at 9:01
GordonMGordonM
31k15 gold badges87 silver badges129 bronze badges
0
I had the same problem and for me, it was having multiple PHP versions.
So specifying the full address of the PHP solved the problem.
answered Jun 23, 2020 at 11:08
AliRNazariAliRNazari
98417 silver badges28 bronze badges
Adding to Jaspreet Chahal’s answer.
When installing PDO as a shared module, the php.ini file needs to be updated so that the PDO extension will be loaded automatically when PHP runs. You will also need to enable any database specific drivers there too; make sure that they are listed after the pdo.so line, as PDO must be initialized before the database-specific extensions can be loaded. If you built PDO and the database-specific extensions statically, you can skip this step(Source).
What I mean is, it should look something like this —
extension=pdo.so
should be placed before the extensions of the different database drivers.
answered Apr 7, 2021 at 15:41
Maybe you forget to install doctrine/dbal
composer update
composer require doctrine/dbal
if it didn’t work go to your php.ini (according to current version)
and remove «;»
;extension=pdo_mysql.so
answered Jan 5, 2022 at 21:28
Перейти к содержимому
Заметил как-то следующую ошибку:
PDOException «could not find driver»
Причиной может быть не активированный pdo_mysql либо не установлено php5-mysql.
Посмотрим информацию о PDO:
php -i|grep PDO
В php.ini или подключенных файлах конфигурации должны быть строки:
extension=pdo.so extension=pdo_mysql.so
Посмотрим информацию о php5-mysql:
dpkg --get-selections | grep php5-mysql
Если не установлен, то установим, в Ubuntu это можно сделать например так:
sudo apt-get install php5-mysql sudo apt-get install php-mysql sudo /etc/init.d/apache2 restart sudo service apache2 restart
Привет
Пытаюсь выполнить данную команду из корня проекта zf2:vendorbindoctrine-module orm:validate-schema
Результат работы команды:
[Mapping] OK - The mapping files are correct.
[PDOException]
could not find driver
orm:validate-schema
Юзал поиск, но толкового ничего не нашел.
Были такие варианты, как проблемы с конфиг файлом. Вот мой конфиг:
<?php
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' =>'DoctrineDBALDriverPDOMySqlDriver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'user' => 'root',
'password' => '',
'dbname' => 'ZF2_Test',
)
)
),
),
);
Все путем + есть другой модуль, который работает с ORM Doctrine и он работает без каких-либо проблем.
Были варианты с неподключенным расширением extension=php_pdo_mysql.dll
в php.ini файле. Он у меня подключен в Php.ini + phpinfo() показывает, что PDO включено.
В итоге так и не нашел решения данной проблемы. Что может вызывать эту ошибку и как ее решать?
Спасибо
Solution 1
Hope you are running your project in localhost. In your project folder app/config a file named parameters.ini , Make sure that your Mysql database connection cofiguration is correct. If you are using mysql See database_driver=pdo_mysql
is its driver.
Below is an example.
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = databasename
database_user = msqlusername
database_password = mysqlpassword//if not make blank
mailer_transport = smtp
mailer_host = localhost
mailer_user =
mailer_password =
locale = en
secret = ThisTokenIsNotSoSecretChangeIt
Hope it helps you.
Solution 2
In Ubuntu, write in the console
sudo apt-get install php5-gd php5-mysql
and it will work
Solution 3
You need to have a module called pdo_mysql
.
Look for the following in phpinfo()
output,
pdo_mysql => PDO Driver for MySQL, client library version => 5.1.44
to install pdo_mysql you need to do this:
pecl install pdo
pecl install pdo_mysql
and then add the following to your php.ini
file:
extension=pdo.so
extension=pdo_mysql.so
Solution 4
brew install php70-pdo-pgsql
in case you installed php7 on mac with brew and, change php version according to what you have installed.
Solution 5
if you are using XAMPP then in php.ini file line no 897(depends on version),
;extension=php_pdo_pgsql.dll
uncomment it , then it appears like below
extension=php_pdo_pgsql.dll
in php.ini file line no 897, then restart XAMPP.
Related videos on Youtube
03 : 38
IlluminateDatabaseQueryException] could not find driver [PDOException] could not find driver
01 : 47
Error could not find driver — PDO EXCEPTION XAMPP
03 : 01
uncaughht error: PDOException::(«could not find driver»)
01 : 57
could not find driver php
01 : 12
PDOException “could not find driverâ€� in php — MySQL
01 : 03
How to PHP : PDOException “could not find driver�
Comments
-
I have installed Lampp on my linux system, and I am learning symfony2, while trying to create the schema with symfony2 command
php app/console doctrine:schema:create
I am getting the following error message:-
PDOException “could not find driver”
I also uncomment this line
extension=php_pdo_mysql.dll
in php.ini fileI tried to look and google my issue but couldn’t resolve my problem. when i run
php -m
command i am getting the following result:-PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 [PHP Modules] bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcntl pcre PDO ---- ----
Is there a way i can remove this issue ?
-
ahh ok. I thought you are on linux. well bottom line is that you will need pdo_mysql module to get your PDO stuff working. I am not aware of lampp. it could be as simple as checking if the pdo_mysql dll file is present. Restart your Apache service after uncommenting pdo_mysql.dll package in your ini file.
-
I am using lampp. a package that installs php, appache and mysql its own way rather in default folders..and these cmds give me errors configure: error: Cannot find MySQL header files under ERROR: `/tmp/pear/temp/PDO_MYSQL/configure’ failed
-
yes That helped But What I just changed these two things database_host=»127.0.0.1″ database_port=»3306″ and it worked
-
I also Installed mysql on my ubuntu matchine apart from xampp
-
Thanks this this helped me.
-
php5-gd I was missing =) after installing all the extensions, this was for me the solution, thanks!
-
@Jaspreet Chahal, is your answer works on Linux? I have the same problem with OP but I don’t have permission to edit the
php.ini
file. If your answer really works, I will ask permission to my supervisor to include it inphp.ini
file. -
In my case, I resolve it in this way: php7.0 app/console doctrine:schema:update —force
-
This worked, I just needed to adjust the version
sudo apt-get install php5.6-gd php5.6-mysql
-
jesus christ, thanks finally for that! I was looking half the internet for this answer that was finally correct for windows system….