0

I created a php script with a limit of 500mb but it does not work. I have read that it could be due to php.ini size limit but I can't find php.ini in the server where the site is located. Anyway, if somebody has got an idea about what more I can do apart from modificating the php.ini file, please tell me.

Thank you

EDIT: I have been in contant with my hosting provider and they can't set the "upload_max_filesize" variable up to 64Mb. I looked for information about VPS and I have found out that it needs advanced knowledge in network systems which I do not have... Would it be any other alternative to this? Moreover, the hosting provider offered me a VPS managed by them but the cost is too high (about 150€/month).

alfuco
  • 55
  • 3
  • 12

4 Answers4

4

edit the file php.ini to your server and set these variables:

upload_max_filesize = 500MB
post_max_size = 500MB

Manual: http://php.net/manual/it/ini.core.php

bish
  • 3,381
  • 9
  • 48
  • 69
1

Find your servers php.ini file, usually located in /etc directory (if you have full server access) and change the following:

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

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M
codeguy
  • 662
  • 4
  • 21
1

It sounds to me like you're using shared hosting. Contact your hosting provider, they're probably limiting your upload_max_filesize because you're on shared hosting. If this is the case I'm not sure or anything that will fix it other than getting a VPN

Joe Scotto
  • 10,936
  • 14
  • 66
  • 136
  • I have been in contant with my hosting provider and they can't set the "upload_max_filesize" variable up to 64Mb. I looked for information about VPS and I have found out that it needs advanced knowledge in network systems which I do not have... Would it be any other alternative to this? Moreover, the hosting provider offered me a VPS managed by them but the cost is too high (about 150€/month). – alfuco Nov 13 '15 at 15:41
  • Take a look at Godaddy. https://www.godaddy.com/pro/managed-vps – Joe Scotto Nov 13 '15 at 21:30
0

If you don't have access to your /etc/php.ini you can use .htacess

See this answer: How to set upload_max_filesize in .htaccess?

Community
  • 1
  • 1
Oras
  • 1,036
  • 1
  • 12
  • 18