Maximize the maximum values in php scripts


In some cases you need to make a custom script for uploading files or even update / synchronize two databases.  The php execution time has some restrictions, for security reasons. If a scripts takes more than apache server expects to take the whole procedure stops and your update script does not complete what its meant to do. In those cases you can actually do some changes like this

Find the (in case you run a script in your local server). In a case you have to change tha php.ini in a hosted site, some hosters do give you this option.

; Resource Limits ;
max_execution_time = 240     ; Maximum execution time of each script, in seconds
max_input_time = 240    ; Maximum amount of time each script may spend parsing request data
memory_limit = 20M      ; Maximum amount of memory a script may consume (8MB)

if you post many data change this line (as you need to)

; Maximum size of POST data that PHP will accept.
post_max_size = 30M

If you need to upload file more than tha default (2M – 10M)

; Maximum allowed size for uploaded files.
upload_max_filesize = 25M


No Responses Yet to “Maximize the maximum values in php scripts”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: