hi friends

i use a htaccess file on my linux hoting server to change the "upload_max_filesize" and some other settings. but it shows the internal server error 500.

how to change this setting on my server, Plz help me:(

htaccess file code.

php_value upload_max_filesize 50Mb
php_value post_max_size 50Mb
php_value max_execution_time 500
php_value max_input_time 500

5 Years
Discussion Span
Last Post by karthik_ppts


It all depends on server configuration. You will need to find out these configurations by using the codes below.

Save as anyfileYoulike.php

<?php phpinfo(); ?>

Upload to your server and direct your browser to this file. Look for the value of Server API . If your server says CGI or FAST CGI, then you need to make those entries on php.ini file. Meaning, you can create a new file and name it as php.ini, and then upload it to your server. It could be either in the same level of the directory needing the increase in max_filesize or above it.

Here is the content of your php.ini file

upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 500
max_input_time = 500

If your server API says, Apache 2.0 Handler , apache module or anything about apache, then your .htaccess file should look like this

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 500
php_value max_input_time 500

Remember to check what is on your phpinfo() first.. normally your upload_max_filesize would show 8M and not 8Mb...

WARNING! You CANNOT use BOTH.. ONLY ONE mUST be selected.. CGI or Apache...

Edited by veedeoo: n/a

Votes + Comments
Thank your very much, problem solved brother

Why can't you try this with your php file


Edited by karthik_ppts: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.