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
- Install Leantime v3.7.3 on cPanel shared hosting with PHP 8.2
- Configure config/.env with database credentials
- Point domain to public/ folder
- Visit the domain
- 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
What is your set up?
Self Hosted Server
Version
3.7.3
Describe the issue
Environment
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
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