1

I have a problem, I m using a shared Linux server, I want to upload file of size around 10-100MB. I don't have access to php.ini file.

 ini_set('post_max_size', '64M');
 ini_set('upload_max_filesize', '64M');

It didn't works on server.

Therefore I tried another way using .htacess by creating a file on root directory and placing the following code

php_value upload_max_filesize 40M
php_value post_max_size 42M

But it gives my 500 Internal Server Error.

Is there something wrong I am doing?

Thanks

Ahmad Alfy
  • 12,332
  • 6
  • 62
  • 95
Rohit Nigam
  • 698
  • 8
  • 23

2 Answers2

2

If you get 500 Server Error, it means that your sharing host is not letting you to set these global configuration. Contact your hosting company and ask them to set AllowOverride Options for your host.

Ahmad Alfy
  • 12,332
  • 6
  • 62
  • 95
Faron
  • 1,245
  • 11
  • 20
0

Probably your shared hosting is running PHP as CGI/FastCGI and not as an apache module. You can put php configuration inside an .htaccess file only if apache is running PHP as a module.

Also, for these settings to have effect, it will depend on the AllowOverride setting in the main apache config file, as Faron said in his answer.

Carlos Campderrós
  • 21,266
  • 11
  • 50
  • 57