Log message #4221722

# At Username Text
# Jan 8th 2020, 16:23 ckjksl how is the `DATABASE_URL` being set to `db.sqlite3`?
# Jan 8th 2020, 16:19 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/CommandRunner.php(162): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array) #13 /opt/lampp/htdocs/myprojects/bin/cake.php(12): Cake\Console\CommandRunner->run(Array) #14 {main}```
# Jan 8th 2020, 16:19 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/BakeShell.php(283): Cake\Collection\Collection->each(Object(Closure)) #10 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/Shell.php(517): Bake\Shell\BakeShell->all('users') #11 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/CommandRunner.php(385): Cake\Console\Shell->runCommand(Array, true) #12
# Jan 8th 2020, 16:19 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(101): Bake\Shell\Task\ModelTask->bake('Users') #7 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/BakeShell.php(282): Bake\Shell\Task\ModelTask->main('Users') #8 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php(64): Bake\Shell\BakeShell->Bake\Shell\{closure}('Users', 0) #9
# Jan 8th 2020, 16:19 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php(204): Cake\Core\ObjectRegistry->load('Cake\\Database\\C...', Array) #4 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(196): Cake\Datasource\ConnectionManager::get('default') #5 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(113): Bake\Shell\Task\ModelTask->getTableObject('Users', 'users') #6
# Jan 8th 2020, 16:19 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Connection.php(119): Cake\Database\Connection->setDriver('', Array) #1 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php(88): Cake\Database\Connection->__construct(Array) #2 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(96): Cake\Datasource\ConnectionRegistry->_create('Cake\\Database\\C...', 'default', Array) #3
# Jan 8th 2020, 16:19 slackebot found. in [/opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Connection.php, line 173] 2020-01-08 16:14:58 Error: [Cake\Database\Exception\MissingDriverException] Database driver could not be found. in /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Connection.php on line 173 Exception Attributes: array ( 'driver' => '', ) Stack Trace: #0
# Jan 8th 2020, 16:19 wizardfix and I discovered I had `DATABASE_URL` set as an environment variable to `db.sqlite3`, so I set this to null string but now get other errors: ```myprojects $ ./bin/cake bake all users Notice Error: Undefined index: className in [/opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php, line 116] Bake All --------------------------------------------------------------- Exception: Database driver could not be
# Jan 8th 2020, 16:19 ckjksl That's pretty close :+1: did you scan your files to see if there were any lines involving sqlite?
# Jan 8th 2020, 16:17 wizardfix @ckjksl not quite: it's ```Datasources' => [ 'default' => [ 'className' => Connection::class, 'driver' => Mysql::class, 'persistent' => false, 'host' => 'localhost',```
# Jan 8th 2020, 16:16 ckjksl so make sure your `className` and `driver` are using Mysql
# Jan 8th 2020, 16:15 ckjksl I think `bake` uses your default database connection by er, default
# Jan 8th 2020, 16:14 ckjksl in your `app.php`, does your database definition look like this: ```Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Mysql', 'persistent' => false, 'host' => 'localhost', ...```
# Jan 8th 2020, 15:42 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/CommandRunner.php(385): Cake\Console\Shell->runCommand(Array, true) #18 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/CommandRunner.php(162): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array) #19 /opt/lampp/htdocs/myprojects/bin/cake.php(12): Cake\Console\CommandRunner->run(Array) #20 {main}``` Can anyone advise please? :thinking_face:
# Jan 8th 2020, 15:42 slackebot Bake\Shell\Task\ModelTask->main('Users') #14 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php(64): Bake\Shell\BakeShell->Bake\Shell\{closure}('Users', 0) #15 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/BakeShell.php(283): Cake\Collection\Collection->each(Object(Closure)) #16 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Console/Shell.php(517): Bake\Shell\BakeShell->all('users') #17
# Jan 8th 2020, 15:42 slackebot Bake\Shell\Task\ModelTask->getAssociations(Object(Cake\ORM\Table)) #11 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(114): Bake\Shell\Task\ModelTask->getTableContext(Object(Cake\ORM\Table), 'users', 'Users') #12 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(101): Bake\Shell\Task\ModelTask->bake('Users') #13 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/BakeShell.php(282):
# Jan 8th 2020, 15:42 slackebot Cake\Database\Connection->getSchemaCollection() #8 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(1050): Bake\Shell\Task\ModelTask->_getAllTables() #9 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(213): Bake\Shell\Task\ModelTask->listAll() #10 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(131):
# Jan 8th 2020, 15:42 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(41): Cake\Database\Schema\Collection->__construct(Object(Cake\Database\Connection)) #6 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Connection.php(390): Cake\Database\Schema\CachedCollection->__construct(Object(Cake\Database\Connection), true) #7 /opt/lampp/htdocs/myprojects/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(1096):
# Jan 8th 2020, 15:42 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php(44): Cake\Database\Driver\Mysql->connect() #3 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php(62): Cake\Database\Schema\BaseSchema->__construct(Object(Cake\Database\Driver\Mysql)) #4 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Schema/Collection.php(51): Cake\Database\Driver\Mysql->schemaDialect() #5
# Jan 8th 2020, 15:42 slackebot /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Driver.php on line 92 Stack Trace: #0 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Driver.php(92): PDO->__construct('mysql:host=loca...', 'root', 'tapir73', Array) #1 /opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php(105): Cake\Database\Driver->_connect('mysql:host=loca...', Array) #2
# Jan 8th 2020, 15:42 wizardfix ```myprojects $ ./bin/cake bake all users Bake All --------------------------------------------------------------- One moment while associations are detected. Exception: SQLSTATE[HY000] [2002] No such file or directory in [/opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Database/Driver.php, line 92] 2020-01-08 15:03:21 Error: [PDOException] SQLSTATE[HY000] [2002] No such file or directory in
# Jan 8th 2020, 15:42 slackebot an error: ```myprojects $ ./bin/cake bake all users Exception: The DSN string 'db.sqlite3' could not be parsed. in [/opt/lampp/htdocs/myprojects/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php, line 291]``` It seemed strange that it's getting a string with `sqlite` in it, as the database is MySql/MariaDB. Clearly, such a string won't be parsed as a DSN string. So I wonder how to get the correct DSN string passed to this function? I have
# Jan 8th 2020, 15:42 slackebot tried removing the line `'url' => env('DATABASE_URL', null),` from the `Datasources` section of `app.php`, and the result is a different failure:
# Jan 8th 2020, 15:42 wizardfix *Issue with `bake` in CakePHP 3.8* - I have CakePHP 3.8 installed (with composer). - A previous project, created manually, works fine. In phpMyAdmin, I created a database with seven tables. I edited /config/app.php with correct username, password and database name. The default landing page now shows all green lights, for Environment, Filesystem, Database and DebugKit. I then tried, for the first time, to bake an application, and ran into
# Jan 8th 2020, 14:10 etibor is anyone who use PDF filling solution? PDFTK or mikehaertl / *php-pdftk ?*
# Jan 8th 2020, 13:44 damiano $routes->scope('/', function (RouteBuilder $builder) { ..... } <---- in routes.php
# Jan 8th 2020, 13:43 damiano @jotpe yes as i told you i have another route that match / but with another host (Default)
# Jan 8th 2020, 13:40 admad GDPR ahoy
# Jan 8th 2020, 13:35 challgren Boss said to put the cookie popup everywhere!
# Jan 8th 2020, 13:18 dereuromark ;)
# Jan 8th 2020, 13:17 martin hmm, having a rss reader, now on of the sites i'm reading added a cookie popup before the rss feed, why are people so stupid :P
# Jan 8th 2020, 13:05 jmmonty @admad That’s great , thank you - I’ll have a good read through and part was working out which of the collection functions to go with.
# Jan 8th 2020, 13:04 ashish_onmobile if anyone can help me that will be great.
# Jan 8th 2020, 13:03 ashish_onmobile but I am not able to get the pagination for my json response from server.
# Jan 8th 2020, 13:03 ashish_onmobile I have added ApiPagination as listener
# Jan 8th 2020, 13:03 slackebot 'Crud.Api', 'Crud.ApiPagination', 'Crud.ApiQueryLog' ]]); $this->loadComponent('Security', ['blackholeCallback' => 'blackhole']); }```
# Jan 8th 2020, 13:03 ashish_onmobile ```public function initialize(): void { parent::initialize(); $this->loadComponent('RequestHandler'); $this->loadComponent('Crud.Crud', [ 'actions' => [ 'Crud.Index', 'Crud.View', 'Crud.Add', 'Crud.Edit', 'Crud.Delete' ], 'listeners' => [
# Jan 8th 2020, 13:02 ashish_onmobile I am working on cakephp 4.x and using friendsofcake crud 6.0.0-beta
# Jan 8th 2020, 13:02 ashish_onmobile Hi All
# Jan 8th 2020, 12:58 admad the arguments of `combine()` can be a callable instead of string
# Jan 8th 2020, 12:55 jmmonty I’ll give that a whirl now - appreciate it