Hi everyone,
New to Shopify, day 2
and need some help. I installed PHP 8.1, Laravel, Git, Npm and Ngrok (Windows 10 here) and created an app (custom app) from my free Shopify partner account. I am using the sqlserv database driver to connect to a MSSQL database that I have access to.
I run my app from localhost using npm run dev, and the service start up. When I load my app in a browser through ngrok (with my shop name and host parameters) I reach my app, which then gives me this error:
Illuminate\Database\QueryException
could not find driver (SQL: select top 1 1 [exists] from [sessions] where [shop] = MYAPPNAME.myshopify.com and [access_token] is not null)
There is then a big debug page with this:
I don’t know if the driver is the issue (PHP says it is loaded fine - php_sqlsrv_81_ts_x64.dll - I use the Windows PHP 8.1 thread safe version also). Also, I do not have the table “sessions”. I really just want to code my own custom app and SQL queries in PHP and run it via a Shopify interface.
Can anyone tell me where my "app " is in terms of its PHP code? It seems as if the app is picking up a default application and it seems to be trying to run it against a different data source.
My .env file has all the correct details (ip, username, password, ip address etc) for the database, redacted here:
APP_NAME=“myapp”
APP_ENV=local
APP_KEY=base64:mylongkey
APP_DEBUG=true
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=sqlsrv
DB_HOST=1.2.3.4
DB_PORT=1433
DB_DATABASE=databasename
DB_USERNAME=sa
DB_PASSWORD=sapassword
I can connect to the database fine using SMSS with these details.
Any help appreciated ![]()
