How can one detect mod_env compatibility in LiteSpeed

#1
Is there a function or process that we can use in PHP to determine if Apache "mod_env" module compatibility is loaded? We need this to make sure that our programs will run on LiteSpeed.
 

serpent_driver

Well-Known Member
#2
Try this:
PHP:
if (function_exists('apache_get_modules')) {
    $modules = apache_get_modules();
    $module_name = 'mod_env';
    if (in_array($module_name, $modules)) {
        echo "$module_name is loaded.";
    } else {
        echo "$module_name is not loaded.";
    }
} else {
    echo "Function apache_get_modules() is not available.";
}
Provided by Kitt - The ultimate Cache Warmup Crawler for LiteSpeed LScache. Join https://www.cachecrawler.com
 
Last edited:
#3
You can't get Apache Modules If Apache is not the Server API. The answer does not help with this question...
 
Last edited:
#5
Yes, I know but it does not help with the question... All that code does is to tell me that I cannot see the Apache Modules and that Apache is not used (which maybe false), there is another system in front of it that will not allow you to see the Apache Modules. I need to know if LiteSpeed will tell me that I can do what I want to do because a compatible module or function in LiteSpeed will give me the same results.
 
#7
I already use code similar to that. I need a way to determine what I need to know no matter which system the software is on, Not just for a specific system...
 

serpent_driver

Well-Known Member
#8
This forum provides you with support related to LiteSpeed Enterprise. If you have OLS then please use OLS support forum. There is no universal solution.
 
#10
You can try
Code:
if (function_exists('apache_get_modules')) {
    $modules = apache_get_modules();
    if (in_array('mod_env', $modules)) {
        echo "mod_env module is loaded in Apache.";
    } else {
        echo "mod_env module is NOT loaded in Apache.";
    }
} else {
    echo "apache_get_modules() function is not available. Cannot check mod_env module.";
}
Is there a function or process that we can use in PHP to determine if Apache "mod_env" module compatibility is loaded? We need this to make sure that our programs will run on LiteSpeed.
 
Top