Page 1 of 1

Max upload file size in php

PostPosted: October 24th, 2015, 9:49 am
by pgoncalves
I implemented php in .net project like explained here:
http://www.codeproject.com/Tips/1004596 ... SP-NET-MVC

It's all working nice but there is a problem, when uploading big image files, for example 7MB, there is an error:
"The upload size exceeds the max size allowed"
I think the problem is in the php runtime, how do I increase this value?
In config.php have
'MaxSizeUpload' => 100

But there must exist other config, I tried php.ini with this like sugested in other posts:
upload_max_filesize = 10M
post_max_size = 10M

but no sucess, in godaddy shared host.

Re: Max upload file size in php

PostPosted: October 26th, 2015, 5:13 pm
by Jakub Misek
Hi,

Phalanger is ASP.NET hence there is no php.ini but web.config.

See http://forums.asp.net/post/5451137.aspx for setting bigger allowed content limit.

Re: Max upload file size in php

PostPosted: October 27th, 2015, 6:48 pm
by pgoncalves
Thank's, it works now.
I don't know very well how the php engine is integrated in .net with phalanger, so i was confused.
I configured maxRequestLength before trying the php file limits, but I did a mistake when converting from KB to MB so I put a big number in web.config maxRequestLength, that the server was ignoring i think.

The config bellow is necessary? I just put the <httpRuntime maxRequestLength="1048576" timeout="3600" /> and it works nice.

<system.webServer>
<security>
<requestFiltering>
<!-- This will handle requests up to 1024MB (1GB) -->
<requestLimits maxAllowedContentLength="1048576000" />
</requestFiltering>
</security>
</system.webServer>

Re: Max upload file size in php

PostPosted: October 27th, 2015, 9:02 pm
by Jakub Misek
I would try whether it is required or not. I just know IIS has some additional config settings.

Phalanger *replaces* PHP completely, so there is no php.exe or php.ini or php_.dll extensions.

Re: Max upload file size in php

PostPosted: October 27th, 2015, 9:17 pm
by pgoncalves
Ok, thank's for the support.
Phalanger is amazing!