At first I could not connect to the database but by hosting the database in 'kirby/data/db.s3db' I solved the problem and could connect and perform queries without problem.
Now, I need to access from a widget that I created for the panel and I get the same error: SQLSTATE [HY000] [14] unable to open database file
I guess it’s a permissions problem but I do not know where I can host the database file so I can use it from the site and from the panel at the same time.
All the queries that I make are defined in functions in my plugins so they are available everywhere.
Hi, thank you for responding so quickly. This is the folder structure that I use:
C:\WorkSpace\xampp\htdocs\mjc-web\assets…
C:\WorkSpace\xampp\htdocs\mjc-web\content…
C:\WorkSpace\xampp\htdocs\mjc-web\kirby\data\db.s3db
C:\WorkSpace\xampp\htdocs\mjc-web\panel…
C:\WorkSpace\xampp\htdocs\mjc-web\site…
C:\WorkSpace\xampp\htdocs\mjc-web\thumns…
…
Ok, so you have created a new folder within the source kirby folder, I was afraid of that. Never touch the /kirby or panel folders, they will be overwritten on update and should not contain user data. Your data should sit in the root folder, above the root folder (usually not possible on shared hosting), in the assets folder, or within your content folder.