Description

This function sets the PHP version for the account.

Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$php_version = $cpanel->api1('Htaccess','setphpreference', array('5') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $php_version = $cpliveapi->api1('Htaccess','setphpreference', ['5'] ); # Call the function.

 


<cpanel Module="Htaccess::setphpreference( $FORM('php_version') )">




cpapi1 --user=username Htaccess setphpreference 5


This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample

php_version

integer

Required

The PHP version to set as default for the cPanel account.

  • 5
  • 4
5

Returns

This function does not return output.