###前提・実現したいこと
Azure SQLDatabaseをCentOS上のCakePHPで使用したい。
社内システムでAzure SQLDatabaseを使用する為に、CentOS上のWebシステムからもAzure SQLDatabaseを使用したい。
###発生している問題・エラーメッセージ
Database driver Cake\Database\Driver\Sqlserver cannot be used due to a missing PHP extension or unmet dependency ⟩ Cake\Database\Connection->driver CORE/src/Database/Connection.php, line 108 ⟩ Cake\Database\Connection->__construct CORE/src/Datasource/ConnectionRegistry.php, line 89 ⟩ Cake\Datasource\ConnectionRegistry->_create CORE/src/Core/ObjectRegistry.php, line 93 ⟩ Cake\Core\ObjectRegistry->load CORE/src/Datasource/ConnectionManager.php, line 205 …
###該当のソースコード
\config\app.php 'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Sqlserver', 'persistent' => false, 'host' => '***.database.windows.net', /** * CakePHP will use the default DB port based on the driver selected * MySQL on MAMP uses port 8889, MAMP users will want to uncomment * the following line and set the port accordingly */ //'port' => 'non_standard_port_number', 'username' => '*****', 'password' => '*****', 'database' => '*****', 'encoding' => 'utf8', 'timezone' => 'Asia/Tokyo', 'flags' => [], 'cacheMetadata' => true, 'log' => false,
###試したこと
CentOSからtsqlコマンドでAzure SQLDatabaseへの接続は確認できています。
また、CentOSにMySQLをインストールして、そちらに接続した場合はCakePHPから正常に接続される事は確認しました。(driverはMysqlを指定)
CakePHPからAzure SQLDatabaseへの接続ができずに上記のエラーが発生しています。
###補足情報(言語/FW/ツール等のバージョンなど)
CentOS 6.5
Apache 2.4.20
PHP 5.6.4
CakePHP 3.3.5
Azure SQLDatabase V12
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。