Skip to content

Fatal error: PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT undefined #3371

@vivoforta

Description

@vivoforta

What is your set up?

Self Hosted Server

Version

3.7.3

Describe the issue

Environment

  • PHP 8.2 on cPanel shared hosting (EasyApache)
  • pdo_mysql and mysqlnd loaded
  • Leantime v3.7.3

Problem
laravelConfig.php line 579 references PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT
directly without a defined() check. On some PHP builds this constant is missing,
causing a fatal error before Laravel boots. Results in 500 error on all pages.

Suggested fix
Replace:
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => env(...)

With:
(defined('PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT')
? PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT : 1014) => env(...)

Impact
Leantime is completely unusable on shared hosting with this PHP build,
which is common on cPanel/EasyApache servers used by many small businesses
— exactly Leantime's target audience.

Reproduction steps

  1. Install Leantime v3.7.3 on cPanel shared hosting with PHP 8.2
  2. Configure config/.env with database credentials
  3. Point domain to public/ folder
  4. Visit the domain
  5. 500 error on all pages

Error Logs (LEANTIMEFOLDER/storage/logs)

PHP Fatal error: Uncaught Error: Undefined constant
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT in
app/Core/Configuration/laravelConfig.php:579

Next: Illuminate\Contracts\Container\BindingResolutionException:
Target class [session] does not exist in
vendor/laravel/framework/src/Illuminate/Container/Container.php:961

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions