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

Recommended Answers

All 4 Replies

Hi,

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...

commented: Thank your very much, problem solved brother +0

Why can't you try this with your php file

ini_set("upload_max_filesize","50Mb");
ini_set("post_max_size","50Mb");
ini_set("max_execution_time","500");
ini_set("max_input_time","500");

Thank u so much brother, i fell good

Mark this thread as solved if your problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.