Home >Backend Development >PHP Tutorial >How to Increase PHP Execution Timeout for Large Video Uploads?

How to Increase PHP Execution Timeout for Large Video Uploads?

Linda Hamilton
Linda HamiltonOriginal
2024-11-30 04:50:11489browse

How to Increase PHP Execution Timeout for Large Video Uploads?

Increasing Execution Timeout for Video Uploads in PHP

When uploading large video files, you may encounter the error, "The process * exceeded the timeout of 60 seconds." To resolve this issue and allow for successful video uploads, you need to adjust the upload and execution timeout settings in your php.ini file.

php.ini Settings

Open your php.ini file and make the following changes:

  • upload_max_filesize: This setting determines the maximum size of files that can be uploaded. Increase this value to a suitable size for your video files, e.g., "upload_max_filesize = 2M".
  • max_execution_time: This setting sets the maximum time in seconds that a script can run before timing out. For large video uploads, you may need to increase this value to a higher number, e.g., "max_execution_time = 120".

php.ini File Location

The location of your php.ini file varies depending on your system environment. Refer to the PHP documentation for more information: http://php.net/manual/en/ini.list.php.

Note: Remember to restart your web server after making these changes to your php.ini file for them to take effect.

The above is the detailed content of How to Increase PHP Execution Timeout for Large Video Uploads?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn