I am using a Windows 11 work environment with the latest PHP Storm installation and the latest stable release of Yii2. I installed the “basic” template and I am attempting to use a SQLITE database for my connection, not MySQL. When I load the gii module and attempt to access the Model generator I continually get this error:
Database Exception – yii\db\Exception
Error Info: Array (  => HY000  => 14  => unable to open database file
Could this be a permissions issue on Windows? I have tinkered with different ways to name the database file. I can actually open up a raw PHP connection to the file and read and write to it from within PHPStorm. Here is the code:
<?php define('SCRAPE_DATABASE', "webscrapes" . date('ymd') . ".sqlite"); return [ 'class' => 'yii\db\Connection', 'dsn' => 'sqlite:/web/' . SCRAPE_DATABASE, ];
I think this is all the relevant info I have. Can’t figure this out.
The topic says root directory but in the code sample I tried putting the file in the web directory