Sounds like php is missing the mysql module. You need to install/enable it
Laravel app query for session id for imported database Cpanel
Guys help me to solve this:
could not find driver (SQL: select * from sessions where id = Rtxq1XHuZ6u2z2jy9B2eoPmnOVixjWsWXd79w4J8 limit 1)
I imported a database on cpanel phpmyadmin and got this error
@Sinnbeck I imported a database which is different from the one with which the app was developed. I deleted everything in my original database and created a similar new app and took only the database and uploaded to cpanel and now we have a problem of session id.
@ojwando the error is "could not find driver". You can try setting the session driver to something else than database, but the error will most likely just get thrown for other database queries
If you want to store sessions in the database, be sure that you run this migration on the database first https://laravel.com/docs/9.x/session#database
@Sinnbeck Kindly show me how and where to enable the php in the mysql
@ojwando did you try another session driver to make sure my assumption was correct?
@Sinnbeck You see now my project is already in cpanel and i am not able to use artisan run migration command on cpanel
@Sinnbeck Just enlighten me please which other session driver there is apart from the database one
@ojwando just try changing the driver to file
SESSION_DRIVER=file
@Sinnbeck i have changed the session driver in .env file to file and the error is still there. My website link www.kcseforecast.com
@ojwando you might have cached your config. Run php artisan config:cache to redo the cache
@Sinnbeck I had interfered with my files and running artisan commands give symlink() file not found so kindly suggest to me another way of removing the cache
@ojwando remove the file /bootstrap/cache/config.php
@Sinnbeck Here is the new problem after removing the file :could not find driver (SQL: select * from posts where posts.deleted_at is null order by view_count desc limit 5)
@ojwando as expected. So now you need to check the php install in cpanel. There should be an option to enable the mysql extension
@Sinnbeck I checked this on cpanel php version link then extension -> nd_pdo_mysql . Thanks man you are the best.
@ojwando happy to help :)
Please or to participate in this conversation.