環境資訊
作業系統:WINDOWS 10 1909 專業版 64位元
Laravel Framework 7.8.1
Laravel/homestead (virtualbox, 9.5.1)
Vagrant version 2.2.9
git version 2.26.2.windows.1
MYSQL Workbench version 8.0.19
APACHE version 2.4.41
目前需求:
Homestead的MYSQL是用本地MYSQL Workbench連線(Standard TCP/IP over SSH)。
無法透過Laravel的Migrate新增資料表,Migrate語法如下(Laravel預設的):
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
出現錯誤是”找不到PHP指定模組”
Warning: Module 'mysqli' already loaded in Unknown on line 0
Whoops\Exception\ErrorException
PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)")
PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: C:/本地PHP路徑/ext\pdo_oci (找
不到指定的模組。), C:/本地PHP路徑/ext\php_pdo_oci.dll (找不到指定的模組。))
因為在電腦中有本地PHP與Homestead內建php,是否不能用本地的PHP呢?
如果不行請問要如何連Homestead的PHP呢? 要將Homestead的PHP加入PATH嗎?
先感謝各位高手指教了
連進去 vagrant ssh