PHP Fatal Error Maximum Execution Time Issue & htaccess

Lot of times it happen that we get some weird error in PHP. One of such errors is a Fatal Error that usually occurs when Uploading big files in PHP. This error has to do something with the Maximum timeout setting. When we upload a large file it may happen that the timeout occurs and result in failure. This is commonly seen while upgrading plugins in WordPress. So how to avoid these errors? Well, htaccess comes to rescue in such problems. Related: 21 Very Useful htaccess Tips & Tricks The default value of file upload size for most of the webservers is 2MB. This limit a user from uploading large files to the server. Add following lines in your .htaccess file to change the default size for upload. If .htaccess file is not present in your root directory, create one.
#Set the Maximum Input time php_value max_input_time 200 #Maximum size allowed in Post method php_value post_max_size 20M #Set the Maximum Execution Time for Script php_value max_execution_time 200 #Set the Maximum Upload Filesize php_value upload_max_filesize 15M
Code language: Bash (bash)

View Comments

Recent Posts

  • Java

Java URL Encoder/Decoder Example

Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…

4 years ago
  • General

How to Show Multiple Examples in OpenAPI Spec

Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…

4 years ago
  • General

How to Run Local WordPress using Docker

Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…

4 years ago
  • Java

Create and Validate JWT Token in Java using JJWT

1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…

4 years ago
  • Spring Boot

Spring Boot GraphQL Subscription Realtime API

GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…

5 years ago
  • Spring Boot

Spring Boot DynamoDB Integration Test using Testcontainers

1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…

5 years ago