In our project we don't need a database, so how do we setup cakephp 3.x on a local machine without modifying the database config? I have this issue when I'm running my site.
Error: Class 'PDO' not found File /usr/share/nginx/dchannel/vendor/cakephp/cakephp/src/Database/Type.php Line: 100
So please suggest a better way to do disable the database on cakephp 3.x
Thank you in advance.
Theoretically that should be possible if you just avoid to touch anything that interacts with the datbase, or uses PDO related constants and stuff, like the Type classes that are by default involved in the applications bootstrap:
https://github.com/cakephp/app/blob/3.5.0/config/bootstrap.php#L174-L189
Also you cannot use Migrations or DebugKit, as both require PDO:
https://github.com/cakephp/app/blob/3.5.0/config/bootstrap.php#L206-L207 https://github.com/cakephp/app/blob/3.5.0/config/bootstrap.php#L211-L217
If you comment these snippets, and do not touch the model layer anywhere, then it should work. However I don't think that there is a guarantee that this will continue to work. If you want to make sure you can ask the core devs over at Slack or IRC, or maybe even open a ticket on GitHub.
I think it is possible because cakephp use its own design template. so just replace the template with your one . php default template \src\Template\Pages\home.ctp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With