Normal hosting on Ru-Center. PHP 7. The PDO and PDO_MYSQL extensions are included. Framework Yii2.

When trying to migrate ...

php yii migrate 

... an error occurs:

PHP Fatal Error 'yii \ base \ ErrorException' with message 'Class' PDO 'not found'

enter image description here

I turned to the hoster. They advised to carry out a command of the following form:

 php -c ~/etc/php.ini /home/[host_user]/[domain_foder]/yii migrate 

But the result of this command is the following error:

Exception 'yii \ db \ Exception' with message 'SQLSTATE [HY000] [2002] No such file or directory'

enter image description here

Tell me which way to think ...

  • Do they have PDO in php enabled? - Aleksey Shimanskyy
  • php -i | grep pdo php -i | grep pdo - u_mulder
  • php -i | grep pdo prints nothing, but in php.ini pdo.so and pdo_mysql.so are present and uncommented - Skim

0