Community

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

Ap
Apon #1

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
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:
extension_loaded(“mailparse”)

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

<?php
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

Dr
Dreamer #2

Did you check logs is there any errors?

Sign in to reply