Difference between revisions of "PHP and WHMCS"

From WHMCS Documentation

(Created page with "Your PHP configuration is extremely important for successfully running WHMCS. For more information about PHP and WHMCS, see: * PHP Info * PHP Upgrade Guide * Blank...")
 
 
Line 11: Line 11:
 
The 500 internal server error indicates there is a problem processing the request. This is usually due to a customisation or an issue with the PHP configuration causing issues.
 
The 500 internal server error indicates there is a problem processing the request. This is usually due to a customisation or an issue with the PHP configuration causing issues.
  
The first step would be to try and get further details on the error being raised. You can do this by adding <tt>$display_errors = true;</tt> to your <tt>configuration.php</tt> file or reviewing the PHP <tt>error_log</tt> file.
+
To troubleshoot this, begin by adding <tt>$display_errors = true;</tt> to your <tt>configuration.php</tt> file or reviewing the PHP <tt>error_log</tt> file.
  
This should indicate which file is causing the error. If it is a 3rd party module or customization then you should remove the custom files and confirm if this resolves the error.
+
This should indicate which file is causing the error. If it is a third-party module or customization, remove the custom files and confirm if this resolves the error.
  
 
== Maximum Execution Time ==
 
== Maximum Execution Time ==
  
By default, WHMCS enforces a max_execution_time limit of 300 seconds for general requests.
+
By default, WHMCS enforces a <tt>max_execution_time</tt> limit of <tt>300</tt> seconds for general requests.
  
If this limit is too little for a given task or operation, you may encounter an error message that looks something like the following
+
If this limit is too low for a specific task or operation, you may see the following error:
  
 
<div class="source-cli">
 
<div class="source-cli">
Line 27: Line 27:
 
===Increasing the max_execution_time===
 
===Increasing the max_execution_time===
  
If you wish to override the max execution time limit and increase it to a higher value, you can do so by adding the following line to your WHMCS configuration.php file:
+
To override the max execution time limit and increase it to a higher value, add the following line to your WHMCS <tt>configuration.php</tt> file:
  
 
<div class="source-cli">
 
<div class="source-cli">
 
$overidephptimelimit = 500;
 
$overidephptimelimit = 500;
 
</div>
 
</div>

Latest revision as of 20:04, 27 April 2022

Your PHP configuration is extremely important for successfully running WHMCS.

For more information about PHP and WHMCS, see:

500 Internal Server Error

The 500 internal server error indicates there is a problem processing the request. This is usually due to a customisation or an issue with the PHP configuration causing issues.

To troubleshoot this, begin by adding $display_errors = true; to your configuration.php file or reviewing the PHP error_log file.

This should indicate which file is causing the error. If it is a third-party module or customization, remove the custom files and confirm if this resolves the error.

Maximum Execution Time

By default, WHMCS enforces a max_execution_time limit of 300 seconds for general requests.

If this limit is too low for a specific task or operation, you may see the following error:

PHP Fatal error: Maximum execution time of 300 seconds exceeded in /path/to/file.php

Increasing the max_execution_time

To override the max execution time limit and increase it to a higher value, add the following line to your WHMCS configuration.php file:

$overidephptimelimit = 500;