Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sanaTBS's avatar

Class "PDO" not found for laravel 9 application

I am facing a problem On localhost may project is properly working but when I upload it into cPanel it give and error "Class "PDO" not found" and if i run any command in the cPanel terminal that also give error "PHP's phar extension is missing. Composer requires it to run. Enable the extension or recompile php without --disable-phar then try again." and I checked the POD and phar extension in cPanel php version these are already enabled If someone idea about this situation in cPanel, please share here.

0 likes
3 replies
kokoshneta's avatar
Level 27

Do you also see them in your phpinfo() output?

kokoshneta's avatar

@sanaTBS Then I would guess there are multiple versions of PHP on the server, and the one cPanel is showing you is not the same as the one the website content is actually run through.

Or perhaps cPanel only shows whether they are commented out in the php.ini file, but not whether they are actually installed – in that case, the actual extension files may not be where they’re supposed to be.

1 like

Please or to participate in this conversation.