PHP Mailparse Extension loads when called through CLI, but not through openlitespeed

Server : Ubuntu 22.04,
One of website using PHP 8.0 and there need mailparse extension. I installed mailparse by SSH, after install i verified way below
$ php -m | grep mailparse

also installd mbstring.

when i check mailparse extension from web by calling function then its returning false
#php code to check extension loaded or not:

then I created a php file test_mailparse.php in my public folder

if (extension_loaded('mailparse')) {
    echo 'Mailparse extension loaded: Yes';
} else {
    echo 'Mailparse extension loaded: No';

when I run test_mailparse.php by php cli then its showing mailparse extension is working well.

but why not working with web??

Can anyone help me please

Did you check logs is there any errors?