When managing PHP environments with BT Panel, you may sometimes encounter situations where PHP does not run properly, causing website functions to be limited or inaccessible. This article covers common causes of this issue and corresponding troubleshooting steps to help you quickly resolve it.
First, verify that the PHP version selected in BT Panel is appropriate. Go to the "Sites" menu on the left, select the relevant site, then open the "Settings" tab and check the "PHP Version". Adjust it if necessary and save the changes.
Also, ensure the php.ini configuration file has reasonable parameter settings. Go to the "Files" menu, locate the php.ini file in the site's root directory, and carefully modify relevant settings. Common parameters to adjust include:
memory_limit: Limits the maximum memory usage for PHP scripts. Increase if running memory-intensive scripts.
max_execution_time: Sets the maximum execution time of scripts to prevent timeout interruptions.
upload_max_filesize: Limits the maximum upload file size, affecting upload functionality.
Example configuration:
memory_limit = 128M max_execution_time = 300 upload_max_filesize = 10M
PHP functionalities depend on extensions. Go to the "Extensions" menu in BT Panel to check if required extensions are installed and enabled. If any necessary extensions are missing, click "Install" and restart the PHP service to apply changes.
You can also edit the php.ini file and ensure extension lines are uncommented by removing the leading semicolon ";" to enable them.
PHP error logs are crucial for diagnosing issues. Go to the "Logs" menu in BT Panel, select the target site, and switch to the "Error Log" tab to view recent error messages. Use the logs to identify and resolve specific problems.
Ensure PHP scripts have sufficient permissions to access required files and directories. Go to the "Files" menu, locate the relevant folders or files, and click "Properties" to check permissions. Common permissions are 755 or 777, adjusted as needed for security.
If previous methods fail, restarting the PHP service often resolves environment anomalies. Go to the "Software" menu in BT Panel, find the PHP version, and click "Restart".
In summary, PHP not running on BT Panel usually relates to configuration errors, missing extensions, insufficient permissions, or service issues. Systematically checking configuration, extensions, logs, permissions, and restarting the service can resolve most issues. Adjust settings and operations according to your specific environment.