Symfony 6 / Doctrine - 驅動程式發生例外狀況:找不到驅動程式
P粉729518806
P粉729518806 2024-01-21 16:23:09
0
1
613

我嘗試設定我的 symfony 項目,一切都很好,因為我嘗試建立學說資料庫。 我在 .env 檔案中寫入了 DATABASE_URL,這是正確的,我想是這樣,但是無論是我的本地 xampp 伺服器還是我的 Web 伺服器,都不起作用。

我總是遇到同樣的錯誤:

[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粉729518806
P粉729518806

全部回覆(1)
P粉198814372

您可能尚未在 php.ini 檔案中啟用 pdo_mysql 擴充功能。 嘗試取消註解 php.ini 中的 ;extension=pdo_mysql 行。

請注意,您的 php 控制台可能會使用與執行應用程式的檔案不同的 php.ini 檔案。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!