Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.26
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
softaculous /
apps /
openlitespeed /
themes /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
lsphp_settings_theme.php
14.32
KB
-rw-r--r--
2024-09-20 08:35
ols_settings_theme.php
15.53
KB
-rw-r--r--
2026-04-06 03:24
Save
Rename
<?php ////////////////////////////////////////////////////////////// //=========================================================== // WEBUZO CONTROL PANEL // Inspired by the DESIRE to be the BEST OF ALL // ---------------------------------------------------------- // Started by: Pulkit // Date: 10th Jan 2009 // Time: 21:00 hrs // Site: https://webuzo.com/ (WEBUZO) // ---------------------------------------------------------- // Please Read the Terms of Use at https://webuzo.com/terms // ---------------------------------------------------------- //=========================================================== // (c) Softaculous Ltd. //=========================================================== ////////////////////////////////////////////////////////////// if(!defined('SOFTACULOUS')){ die('Hacking Attempt'); } function lsphp_settings_theme(){ global $theme, $globals, $user, $langs, $error, $saved, $list, $done, $load_lsphp, $installed_php, $iapps, $apps, $U, $default_env; error_handle($error); echo ' <div class="soft-smbox col-12 p-3 col-12 col-md-10 mx-auto"> <div class="sai_main_head text-center"> <img src="'.$theme['images'].'php_conf.png" class="me-1"/>'.__('LSPHP Settings').' </div> </div>'; echo ' <div id="lsphp_setting" class="soft-smbox p-4 col-12 col-md-10 mt-4 mx-auto"> <div class="sai_main_head text-center"> <h5 id="addRecordLabel">'.(!empty(optREQ('user')) ? __('LSPHP Settings for user $0 $1 $2', ['<b>', optREQ('user'), '</b>']) : __('Global LSPHP Settings')).'</h5> <h5 id="php_text" class="mb-2"><b>'.(!empty(optREQ('php')) ? $installed_php[trim(optREQ('php'))]['name'].' ('.optREQ('php').')' : $installed_php[$globals['WU_DEFAULT_PHP']]['name'].' ('.$globals['WU_DEFAULT_PHP'].')').'</b></h5>'; if(empty(optREQ('user'))){ echo ' <div class="alert alert-warning"> '.__('$0 NOTE : $1 Global settings will be applied to users, if users do not have custom settings saved. ', ['<strong>', '</strong>']).' </div>'; } echo ' </div> <div class="form-horizontal row "> <div class="mb-4 row"> <div class="col-md-6"> <label class="sai_head text-center">'.__('Username :-').'</label><br/> <select class="form-select make-select2" s2-placeholder="'.__('Select User').'" s2-ajaxurl="'.$globals['index'].'act=users&api=json" s2-query="search" s2-data-key="users" s2-data-subkey="user" s2-result-add="'.htmlentities(json_encode([['text' => 'Default value', 'id' => '0', 'value' => '0']])).'"style="width: 100%" id="user" name="user"> <option value="'.optREQ('user').'" selected="selected">'.optREQ('user').'</option> </select> </div> <div class="col-md-6"> <label class="sai_head text-center">'.__('PHP Version :-').'</label><br/> <select class="form-select make-select2" id="php" name="php"> <option value="default" '.(empty(optREQ('php')) ? 'selected' : '').'>'.__('Default').' '.$installed_php[$globals['WU_DEFAULT_PHP']]['name'].' ('.$globals['WU_DEFAULT_PHP'].')</option>'; foreach($installed_php as $k => $v){ echo '<option value="'.$k.'" '.(trim(optREQ('php')) == $k ? 'selected' : '').'>'.$v['name'].' ('.$k.')</option>'; } echo ' </select> </div> </div> <label for="soft_limit" class="sai_head col-md-6">'.__('LSPHP Process Soft Limit ').'<span class="sai_exp">'.__('Limits the total number of processes that can be created on behalf of a user. All existing processes will be counted against this limit, not just new processes to be started. $0 The operating system\'s default setting will be used if this value is 0 $1', ['<b>','</b>']).'</span></label> <input type="number" id="soft_limit" name="soft_limit" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('soft_limit', (!empty($load_lsphp) ? $load_lsphp['soft_limit'] : 400)).'" style="width: 50%;"/> <label for="hard_limit" class="sai_head col-md-6">'.__('LSPHP Process Hard Limit ').'<span class="sai_exp">'.__('Much the same as "Process Soft Limit", except the soft limit can be raised up to the hard limit from within a user process. $0 The operating system\'s default setting will be used if this value is 0 $1', ['<b>','</b>']).'</span></label> <input type="number" id="hard_limit" name="hard_limit" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('hard_limit', (!empty($load_lsphp) ? $load_lsphp['hard_limit'] : 500)).'" style="width: 50%;"/> <label for="memory_soft_limit" class="sai_head col-md-6">'.__('LSPHP Memory Soft Limit (bytes) ').'<span class="sai_exp">'.__('The desired minimum number of idle server processes. $0 The operating system\'s default setting will be used if this value is 0 $1', ['<b>','</b>']).'</span></label> <input type="text" id="memory_soft_limit" name="memory_soft_limit" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('memory_soft_limit', (!empty($load_lsphp) ? $load_lsphp['memory_soft_limit'] : '2047M')).'" style="width: 50%;"/> <label for="memory_hard_limit" class="sai_head col-md-6">'.__('LSPHP Memory Hard Limit (bytes) ').'<span class="sai_exp">'.__('The desired maximum number of idle server processes. $0 The operating system\'s default setting will be used if this value is 0 $1', ['<b>','</b>']).'</span></label> <input type="text" id="memory_hard_limit" name="memory_hard_limit" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('memory_hard_limit', (!empty($load_lsphp) ? $load_lsphp['memory_hard_limit'] : '2047M')).'" style="width: 50%;"/> <label for="maxConns" class="sai_head col-md-6">'.__('Max Connections ').'<span class="sai_exp">'.__('Specifies the maximum number of concurrent connections that can be established between the server and an external application. This setting controls how many requests can be processed concurrently by an external application.').'</span></label> <input type="number" id="maxConns" name="maxConns" class="form-control mb-3 col-md-6" min="1" max="2000" value="'.POSTval('maxConns', (!empty($load_lsphp) ? $load_lsphp['maxConns'] : 10)).'" style="width: 50%;"/> <label for="pcKeepAliveTimeout" class="sai_head col-md-6">'.__('Connection Keep-Alive Timeout ').'<span class="sai_exp">'.__('Specifies the maximum time in seconds to keep an idle persistent connection open. When set to "-1", the connection will never timeout. When set to 0 or greater, the connection will be closed after this time in seconds has passed.').'</span></label> <input type="number" id="pcKeepAliveTimeout" name="pcKeepAliveTimeout" class="form-control mb-3 col-md-6" min="-1" max="10000" value="'.POSTval('pcKeepAliveTimeout', (!empty($load_lsphp) ? $load_lsphp['pcKeepAliveTimeout'] : 1)).'" style="width: 50%;"/> <label for="persistConn" class="sai_head col-md-6">'.__('Persistent Connection ').'<span class="sai_exp">'.__('Specifies whether to keep the connection open after a request has been processed. Persistent connections can increase performance.').'</span></label> <select class="form-select mb-3 col-md-6" name="persistConn" id="persistConn" style="width: 50%;"> <option '.POSTselect('persistConn', '1', ($load_lsphp['persistConn'] == '1')).' value="1">'.__('Yes').'</option> <option '.POSTselect('persistConn', '0', ($load_lsphp['persistConn'] == '0')).' value="0">'.__('No ').'</option> </select> <label for="retryTimeout" class="sai_head col-md-6">'.__('Retry Timeout (secs) ').'<span class="sai_exp">'.__('Specifies the period of time that the server waits before retrying an external application that had a prior communication problem.').'</span></label> <input type="number" id="retryTimeout" name="retryTimeout" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('retryTimeout', (!empty($load_lsphp) ? $load_lsphp['retryTimeout'] : 0)).'" style="width: 50%;"/> <label for="initTimeout" class="sai_head col-md-6">'.__('Initial Request Timeout (secs) ').'<span class="sai_exp">'.__('Specifies the maximum time in seconds the server will wait for the external application to respond to the first request over a new established connection.').'</span></label> <input type="number" id="initTimeout" name="initTimeout" class="form-control mb-3 col-md-6" min="0" value="'.POSTval('initTimeout', (!empty($load_lsphp) ? $load_lsphp['initTimeout'] : 600)).'" style="width: 50%;"/> <label for="respBuffer" class="sai_head col-md-6">'.__('Response Buffering ').'<span class="sai_exp">'.__('Specifies whether to buffer responses received from external applications. If a "nph-" (Non-Parsed-Header) script is detected, buffering is turned off for responses with full HTTP headers.').'</span></label> <select class="form-select mb-3 col-md-6" name="respBuffer" id="respBuffer" style="width: 50%;"> <option '.POSTselect('respBuffer', '0', ($load_lsphp['respBuffer'] == '0')).' value="0">'.__('No ').'</option> <option '.POSTselect('respBuffer', '1', ($load_lsphp['respBuffer'] == '1')).' value="1">'.__('Yes').'</option> <option '.POSTselect('respBuffer', '2', ($load_lsphp['respBuffer'] == '2')).' value="2">'.__('No for Non-Parsed-Header (NPH) ').'</option> </select> <label for="autoStart" class="sai_head col-md-6">'.__('Start By Server ').'<span class="sai_exp">'.__('Specifies whether you want the web server to start the application automatically.').'</span></label> <select class="form-select mb-3 col-md-6" name="autoStart" id="autoStart" style="width: 50%;"> <option '.POSTselect('autoStart', '2', ($load_lsphp['autoStart'] == '2')).' value="2">'.__('Yes (Through CGI Daemon) ').'</option> <option '.POSTselect('autoStart', '0', ($load_lsphp['autoStart'] == '0')).' value="0">'.__('No ').'</option> </select> <label for="environment" class="sai_head col-md-6">'.__('Environment ').'<span class="sai_exp">'.__('Specifies extra environment variables for the external application .').'</span></label> <span class="sai_exp2">'.__('Refer to this guide to learn more about the environment: $0 [Click here] $1 ', ['<a href="https://docs.litespeedtech.com/lsws/extapp/php/configuration/options/#variables"target="_blank">', '</a>']).'</span> <div class="flex-grow-1 p-1 col-md-2"> <strong><i onclick="addrow(\'env_var\')" class="go_btn blue_btn float-end" style="cursor: pointer;">Add +</i></strong> </div> <div id="env_var" class="px-4">'; if(!empty($load_lsphp['environment']) || !empty($default_env)){ $env_var = !empty($load_lsphp['environment']) ? json_decode($load_lsphp['environment']) : $default_env; $delete_btn = ' <div class="flex-shrink-0 p-1 col-md-1 d-flex align-self-center"> <i class="fas fa-times pl-1 delip text-danger cursor-pointer py-2 mt-4 justify-content-center d-block"></i> </div>'; foreach($env_var as $ek => $ev){ echo ' <div class="d-flex row"> <div class="flex-grow-1 p-1 col-md-5"> <label class="pt-0 form-label me-1">'.__('Variable name').' :</label> <input type="text" class="form-control" name="var_name[]" value="'.$ek.'" size="30" /> </div> <div class="flex-grow-1 p-1 col-md-5"> <label class="pt-0 form-label me-1">'.__('Value').' :</label> <input type="text" class="form-control" name="var_val[]" value="'.$ev.'" size="30" /> </div> '.($ek != 'LSAPI_CHILDREN' ? $delete_btn : '').' </div>'; } } echo' </div> <div class="text-center my-3"> <input type="button" class="btn btn-danger" value="'.__('Reset').'" name="reset_settings" id="reset_settings" data-reset_settings="1"/> <input type="submit" class="btn btn-primary" value="'.__('Submit').'" name="lsphp_submit" id="lsphp_settings" /> </div> </div> </div> <script language="javascript" type="text/javascript"> // Remove extra added envs div $(".delip").click(function(){ var parent = $(this).parent(); var parent2 = $(this).parent().parent(); parent.remove(); parent2.remove(); }); $("#lsphp_settings").click(function(){ var var_name = []; var var_val = []; var env_var = []; $(\'input[name="var_name[]"]\').each(function () { var_name.push(this.value); // $(this).val() }) $(\'input[name="var_val[]"]\').each(function () { var_val.push(this.value); // $(this).val() }) for(var i=0; i<var_name.length; i++) { env_var[var_name[i]] = var_val[i]; } var d = {"lsphp_settings": 1, "soft_limit" : $("#soft_limit").val(), "hard_limit" : $("#hard_limit").val(), "memory_soft_limit" : $("#memory_soft_limit").val(), "memory_hard_limit" : $("#memory_hard_limit").val(), "maxConns" : $("#maxConns").val(), "pcKeepAliveTimeout" : $("#pcKeepAliveTimeout").val(), "persistConn" : $("#persistConn").val(), "respBuffer" : $("#respBuffer").val(), "retryTimeout" : $("#retryTimeout").val(), "initTimeout" : $("#initTimeout").val(), "autoStart" : $("#autoStart").val(), "env_var" : Object.assign({}, env_var)}; submitit(d, {done_reload : window.location.href}); }); $("#user,#php").on("select2:select", function(e, u = {}){ var user = $("#user option:selected").val(); if(user == 0 || user == undefined){ user = ""; } var php = $("#php option:selected").val(); if(php == "default"){ window.location = "'.$globals['index'].'act=lsphp_settings&user="+user; return true; } window.location = "'.$globals['index'].'act=lsphp_settings&user="+user+"&php="+php; }); $("#reset_settings").on("click", function(){ var jEle = $(this); var d = jEle.data(); submitit(d, {done_reload : window.location.href}); }); function addrow(id){ var t = $_(id); var row = document.createElement("div"); row.className = "d-flex row"; var col1 = document.createElement("div"); col1.className = "flex-grow-1 p-1 col-md-5"; var col2 = document.createElement("div"); col2.className = "flex-grow-1 p-1 col-md-5"; var col3 = document.createElement("div"); col3.className = "flex-shrink-0 p-1 col-md-1 d-flex align-self-center"; col1.innerHTML = \'<label class="pt-0 form-label me-1">'.__('Variable name').' :</label><input type="text" class="form-control" name="var_name[]" value="" size="30" />\'; col2.innerHTML = \'<label class="pt-0 form-label me-1">'.__('Value').' :</label><input type="text" class="form-control" name="var_val[]" value="" size="30" />\'; col3.innerHTML = \'<i class="fas fa-times pl-1 delip text-danger cursor-pointer py-2 mt-4 justify-content-center d-block"></i>\'; row.appendChild(col1); row.appendChild(col2); row.appendChild(col3); t.appendChild(row); $(".delip").each(function(){ $(this).unbind("click"); $(this).click(function(){ var parent = $(this).parent(); var parent2 = $(this).parent().parent(); parent.remove(); parent2.remove(); }); }); }; </script>'; }