CodeIgniter 4 Playground |
(11-27-2019, 08:06 PM)John_Betong Wrote: @includebeer Are you experiencing errors? If so, can you paste them here? (Using CodeIgniter since 1.x)
Thanks for what seems to be a brilliant initiative!
However, I'm a little confused at the moment. I have everything installed but cannot see any code other than App/Models/HeroModel.php and what's in the tests directory that isn't part of the base CI installation. What am I missing here? Cheers, Jim
@jimpannell your assessment is correct! Though don’t overlook the docs folder with some very helpful info supplemental to the User Guide. This is a work-in-progress, just launched and still very young. People have had a lot of requests which is great, and we hope to add them (or take community PRs!) as we go, but there is still much to be done.
(11-27-2019, 08:13 PM)jasonzig Wrote:(11-27-2019, 08:06 PM)John_Betong Wrote: @includebeer // Errors after setting .env: john@john:/var/www/ci2/playground$ sudo php spark migrate CodeIgniter CLI Tool - Version 4.0.0-rc.3 - Server-Time: 2019-11-28 22:17:13pm Running all new migrations... Access denied for user '****'@localhost (using password: YES) /var/www/ci2/CodeIgniter4/system/Database/MySQLi/Connection.php - 225 // TRY AGAIN AND SETTING /App/config/Database.php john@john:/var/www/ci2/playground$ sudo php spark migrate CodeIgniter CLI Tool - Version 4.0.0-rc.3 - Server-Time: 2019-11-28 22:17:37pm Running all new migrations... Unknown database '../writable/database.db' /var/www/ci2/CodeIgniter4/system/Database/MySQLi/Connection.php - 225 Hope the above errors are useful.
@John_Betong in your first example it’s a straight MySQL credentials issue. Make sure you can connect to the database from the command line with whatever credentials you are using before trying it in CI4.
In the second example it looks like you didn’t remove the “database” line from .env when you set it in the config files, so even though you are using MySQL it is still looking for the database named for SQLite. Try removing that from .env and running again.
(11-29-2019, 05:14 AM)MGatner Wrote: @John_Betong in your first example it’s a straight MySQL credentials issue. Make sure you can connect to the database from the command line with whatever credentials you are using before trying it in CI4.Many thanks that got me over that hurdle I removed .env and also had to add the following: PHP Code: ./app/Config/Database.php -> public $default = [ Next hurdle with setting the following in index.php: PHP Code: # John PHP Code: CRITICAL - 2019-11-29 08:21:23 --> Undefined property: Config\App::$CSRFHeaderName These errors were generated when using my modified ci4-strict.tk/system files: PHP Code: CRITICAL - 2019-11-29 08:26:58 --> Undefined property: Config\App::$CSRFHeaderName Please let me know if there is any further information required.
This is a known issue with the app/ folder being from an older version. I have a pull request to fix it (https://github.com/codeigniter4projects/...und/pull/8), I will see if I can get that in.
Just to warn you, Playground won't necessarily work with a modified version of system. That's a great way to "play" with the framework but you will likely need to make changes to the app itself as well. @John_Betong Okay that is merged, try pulling the latest version of Playground and see if you have better luck.
Thank you CI Team. Great job.
There is a problem. in playground repository it seems that there is not any system directory. therefore we should copy it manually from 'vendor\codeigniter4\codeigniter4' Best regards
@triluminos That’s intentional! Playground is an example of project distribution using Composer for installation. From the README:
While CodeIgniter does not require it, using this repo also requires the use of Composer to install CodeIgniter as a dependency When you run “composer install” it will download the framework into the appropriate directory. This allows Playground to be distributed independent of a specific version of the framework. If you want to use Playground (or other CI4 apps) without Composer you may but you will need to download the framework separately and update the Paths. |
Welcome Guest, Not a member yet? Register Sign In |