Solved

Upload Files > 30mb

Posted on 2010-09-10
15
1,856 Views
Last Modified: 2013-12-13
I have a flex upload module I made, it uses php and mysql on windows IIS 7

smaller files < 30mb work perfectly, files get uploaded to php and php puts them in the database.

However files > 30 mb fail with this error in the console.

Fleet Pic.zip
_urlReq.url  = https://myURL.com/upload.php
_urlReq.data  = pin=9824
ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2038: File I/O Error. URL: https://myURL.com.com/upload.php"]

Any ideas? This is meant as a tool for my users who cant send large files via email due to restrictions

I changes the php.ini settings & mysql Max Packet size to reflect 100mb limit
0
Comment
Question by:cardilion
  • 7
  • 6
  • 2
15 Comments
 
LVL 30

Expert Comment

by:Marco Gasi
ID: 33647457
just write this two lines in the .htaccess file at the root folder

SECFILTERENGINE OFF
SECFILTERSCANPOST OFF
0
 

Author Comment

by:cardilion
ID: 33647516
Is there a .htaccess file on IIS 7?   the only thing i could see is web.config
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33647591
If you want to add that file to a MySQL database (Just because you mentioned that in your post) the maximum packet size of MySQL could be what's limiting you. You can increase this in your my.ini
0
 
LVL 30

Accepted Solution

by:
Marco Gasi earned 250 total points
ID: 33647600
Sorry: I've not noticed that you use IIS7. To set limit in IIS look at : http://developers.de/blogs/andreas_lehmann/archive/2009/06/24/set-max-upload-size-for-iis7-web-applications.aspx?CommentPosted=true#commentmessage
 Hope this helps and excuse me for mistake :-)
0
 
LVL 20

Assisted Solution

by:ChristoferDutz
ChristoferDutz earned 250 total points
ID: 33647722
It seems that the default here is indeed slightly below 30 MB you can also configure this using the management snap in (Gui Config)
http://dwnz.spaces.live.com/Blog/cns!BCC0973FC7B19D91!643.entry

Or from the console:
http://weblogs.asp.net/steveschofield/archive/2007/05/11/iis7-post-40-adjusting-file-upload-size-in-iis7.aspx
0
 

Author Comment

by:cardilion
ID: 33647951
Right now I want to limit my users to 50 mb to see how well it performs, but i tried to leave room to expand
MySQL -   MAX_ALLOWED_PACKET = 134217728

PHP -
max_execution_time            300 300
max_file_uploads                  20 20
max_input_nesting_level       64 64
max_input_time                    120 120
memory_limit                       128M 128M
post_max_size                    55M 55M
upload_max_filesize            50M 50M

IIS - I ran this cmd inetsrv\appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:1073741824

and webconfig looks like this

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpRedirect enabled="false" destination="https://myURL.com" exactDestination="true" childOnly="true" />
     <security>
        <requestFiltering>
          <requestLimits maxAllowedContentLength="52428800" />
        </requestFiltering>  
      </security>
    </system.webServer>
</configuration>

I still have a 2038 I/O error, is this a flash/code problem or a webserver issue?
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33648386
Could this be the

max_file_uploads                  20 20

I think I understood this parameter as that it's allowed to have 20 File-Uploads per HTTP Post and each of them is allwed to be 20 MB big.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33648407
Ups ... forgett my last post ... but the doubling of the parameters really looks strange to me.
0
 

Author Comment

by:cardilion
ID: 33649627
yea I just copied the parameters from phpinfo( ); it lists local value and master value
0
 

Author Comment

by:cardilion
ID: 33650361
Ok after some testing i found out the Maximum File upload is 41.3mb

anything larger returns 2038 I/O error
0
 

Author Comment

by:cardilion
ID: 33650469
ok also i tried a http upload form and found got the same results which i think rules out my flex/flash code.     When i use the http form i get http status error 500 instead of displaying my query error
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33652651
Do you get any other information (Error message) together with your code 500? Perhaps an "out Of Memory"? Depending on how you send the data, the server has to save the entire data in memory before being able to dump it somewhere.
0
 

Author Comment

by:cardilion
ID: 33661979
This all i get, when i turn off user friendly error messages i get a blank screen.

"The website cannot display the page
 HTTP 500  
   Most likely causes:
•The website is under maintenance.
•The website has a programming error.


This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying."
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33672448
Have to admit that I haven't got any more ideas besides having a look at the server logs.
0
 

Author Closing Comment

by:cardilion
ID: 33673471
Not a complete solution
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now