MYSQL_ATTR_INIT_COMMAND - pls help

Hi guys, i moved an app on a new server and i get an error, i don’t know what to do anymore, pls help.

Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’ is the message

The app runs on the dev environment…

the details of the error:
trace “#0 /var/www/html/somajtehnic/dmxConnectLib/modules/dbconnector.php(12): lib\db\Connection->__construct(Object(lib\App), Object(stdClass), ‘internship’)\n#1 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(195): modules\dbconnector->connect(Object(stdClass), ‘internship’, NULL)\n#2 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(127): lib\App->execSteps(Object(stdClass))\n#3 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(153): lib\App->exec(Object(stdClass), true)\n#4 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(159): lib\App->execSteps(Object(stdClass))\n#5 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(127): lib\App->execSteps(Array)\n#6 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(116): lib\App->exec(Object(stdClass), false)\n#7 /var/www/html/somajtehnic/dmxConnectLib/lib/App.php(94): lib\App->exec(Object(stdClass))\n#8 /var/www/html/somajtehnic/dmxConnect/api/login.php(8): lib\App->define(Object(stdClass))\n#9 {main}”

What version of PHP are you running and is the PDO driver for MySQL installed there?

7.3.31-1

Thanks Teodor.

And can you check if:

It is, i did it an hour ago…

Can you please check this in your php.ini and confirm this by checking the phpinfo()?
Create a php file named info.php and place it in the root of your site.
Add the following content inside it

<?php

phpinfo();

?>

and open the file in your browser. Can you confirm you see the PDO driver for mysql there installed and enabled?

ufff, pdo …no value…
i un commented it in php.ini and i restarted apache…
but it’s not enabled…

Then you need to make sure to install the PDO driver for mysql and enable it.

i am doing this now…thks Teodor.

Problem solved…thks Teodor.

1 Like