Max upload file size in php

Discussion about the open-source Phalanger [?] project.

Max upload file size in php

Postby pgoncalves » October 24th, 2015, 9:49 am

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.
pgoncalves
 
Posts: 3
Joined: October 24th, 2015, 9:41 am

Re: Max upload file size in php

Postby Jakub Misek » October 26th, 2015, 5:13 pm

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.
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2058
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Max upload file size in php

Postby pgoncalves » October 27th, 2015, 6:48 pm

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>
pgoncalves
 
Posts: 3
Joined: October 24th, 2015, 9:41 am

Re: Max upload file size in php

Postby Jakub Misek » October 27th, 2015, 9:02 pm

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.
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2058
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Max upload file size in php

Postby pgoncalves » October 27th, 2015, 9:17 pm

Ok, thank's for the support.
Phalanger is amazing!
pgoncalves
 
Posts: 3
Joined: October 24th, 2015, 9:41 am


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 1 guest

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger