Child pages
  • cPanel API 1 Functions - OptimizeWS::loadoptimizesettings

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function sets the OptimizeWS module's environments.

Note
titleNotes:
  • If mod_deflate rules exist in the account's .htaccess file, the function attempts to parse them and change the {'deflate_selected'} environment's value to  'list'.
  • The function will send the value to the list of currently compressed file types.
 

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$load_settings = $cpanel->api1('OptimizeWS', 'loadoptimizesettings'); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $load_settings = $cpliveapi->api1(OptimizeWS, loadoptimizesettings); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="OptimizeWS::loadoptimizesettings ()">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username OptimizeWS loadoptimizesettings

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (none)

This function does not return output, but sets the following environments for the OptimizeWS functions:

  • {'deflate_selected'} = 'disabled'

  • {'deflate_mime_list'} = 'text/html text/plain text/xml'
  • {'optimize_apache_version'} = Current Apache version.

Parameters

This function does not accept parameters.

Returns

This function does not return output, but sets the following environments for the OptimizeWS functions:

  • {'deflate_selected'} = 'disabled'

  • {'deflate_mime_list'} = 'text/html text/plain text/xml'
  • {'optimize_apache_version'} = Current Apache version.

.