Heim  >  Fragen und Antworten  >  Hauptteil

Symfony 6/Doctrine – DriverException: Treiber nicht gefunden

Ich habe versucht, mein Symfony-Projekt einzurichten, und alles war in Ordnung, als ich versuchte, die Doctrine-Datenbank zu erstellen. Ich habe die DATABASE_URL in die .env-Datei geschrieben, was meiner Meinung nach korrekt ist, aber weder mein lokaler Xampp-Server noch mein Webserver funktionieren.

Ich erhalte immer die gleiche Fehlermeldung:

[critical] Error thrown while running command "doctrine:database:create". Message: "An exception occurred in the driver: could not find driver"


In ExceptionConverter.php line 119:

  An exception occurred in the driver: could not find driver


In Exception.php line 30:

  could not find driver


In Driver.php line 28:

  could not find driver


P粉729518806P粉729518806246 Tage vor619

Antworte allen(1)Ich werde antworten

  • P粉198814372

    P粉1988143722024-01-22 14:18:57

    您可能尚未在 php.ini 文件中启用 pdo_mysql 扩展。 尝试取消注释 php.ini 中的 ;extension=pdo_mysql 行。

    请注意,您的 php 控制台可能使用与运行应用程序的文件不同的 php.ini 文件。

    Antwort
    0
  • StornierenAntwort