Hello, I am hosting my website on cloud share hosting from cpanel. And I am getting Class PDO not found for laravel 9 website.
I think that this is due to the php version conflict on cpanel. My current version on cpanel is 7.4.28, and for
my laravel 9 website I chose PHP 8.0 (ea-php80). It throws Class 'config' not found. When I changed PHP 8.0 (alt-php80). The laravel website is working until the database does not need to connect. When need to connect to database, It throws error again Class "PDO" not found. So, I think, it could not use PDO extension from current php version 7.4.28 and for this specific website is PHP 8.0 (alt-php80). So It could not connect to db and get data or login to website.
However, when I changed the current to PHP 8.0 on cpanel. It is working, without any issue for laravel 8 and 9 projects and some cI3 website too. but I've one project on CI3. It didn't worked at all. And It is important application and I cannot upgrade it now.
I think the solution would be for current version PHP 7.4.28 for cpanel. and choosing PHP 8.0 (alt-php80) for laravel 9, It should make to get PDO extension . If someone idea about this situation in cPanel, please share here.
Kind Regards.