How to Setup Apache Virtual Hosts in CentOS 7
In this tutorial, we will explain how to create Apache virtual hosts on CentOS7. If…
PHP is a popular open-source script language that incorporated into HTML and is ideal for Web development. PHP is a server-side scripting language for creating dynamic and interactive Web pages.
In certain cases, if a PHP web application is not configured properly, it will begin to accumulate unwanted PHP Session files, which will increase in size and ultimately lead to a partition’s disc usage being maxed out.
This is popular in CMSs like WordPress or Joomla, where plugins cannot delete unused PHP Session files according to efficient coding standards.
To address this, cPanel has created an internal script that parses the PHP.ini file to determine the session path and cleans/removes any unused PHP session files in the configured directory.
You’ll need to run the script below to accomplish this:
# /usr/local/cpanel/scripts/clean_user_php_sessions
The script will search for PHP sessions in files named according to the convention below.
/sess_.*/
You’ll need to adjust the second parameter. Which is a regex if your web application saves PHP session files in a different format.
Example:
/usr/local/cpanel/scripts/clean_user_php_sessions 'ci_session\w+$'
Do we sincerely hope that you must now have got a clear idea regarding How to Defragment PHP Session Files? However, if you are still facing any difficulty, free to reach out to the bodHOST Team for proactive support 24×7.
Explore more hosting insights, tips and industry updates.
In this tutorial, we will explain how to create Apache virtual hosts on CentOS7. If…
This article will help you understand how to upload your website in just a few…
Asterisk – VOIP Server on FedoraCore Please check sure you install no pre-configured options. Once…