pakenney38 Posted January 3, 2007 Share Posted January 3, 2007 I am interested in creating an file upload form for people where I work to upload PDF files and the like. Previous attempts have left me frustrated as I can only get about 5-6MB files uploaded in one form submit before there is an error of some sort.Has anyone seen any good examples/books on how to create this?Another idea I had involved:1. The user types in a title for their file2. The user uploads the file with the form3. PHP processes the title, turns it into a bullet text on the web site and links the text to the uploaded file automatically using a MySQL reference. Quote Link to comment Share on other sites More sharing options...
craygo Posted January 3, 2007 Share Posted January 3, 2007 Everything is possible that you want to do except one, The file size. If you are using a web hosting company you have to find out what they have the cgi_timeout and the max_execution_time set at. php scripts can only run as long as these variables allow. the type of connection will determine the size file you can upload.Ray Quote Link to comment Share on other sites More sharing options...
pakenney38 Posted January 3, 2007 Author Share Posted January 3, 2007 So is there some alternative technology you would suggest, or any direction at all?When working on an older upload project, I eventually scrapped it, because I had increased cgi_timeout and the max_execution_time on my Apache server in different increments along with trying some other settings and never got more than 5-6MB uploaded before the browser gave an error. Quote Link to comment Share on other sites More sharing options...
Carterhost Posted January 3, 2007 Share Posted January 3, 2007 if you are unable to edit the php.ini file on your web host, you can put a local copy, with just the modifications you wish to make, in the root folder of your web host.I had the same trouble as you, so changed my local php.ini to read:[code]upload_max_filesize = 10M post_max_size = 11Mmax_execution_time = 300[/code]upload_max_filesize does what it says on the tin. post_max_size specifies the maximum size a POST can be (slightly larger than max_file_upload to account for any overheads or other fields)max_execution_time is the amount of time each script is given to run, you have to take into account the upload speed and filesize when working this out.Some webhosts may not be too happy with you doing this though, as they normally create php.ini for maximum performance among all their hosted domains. I suppose if they contact you about it, then you'll have to cease and desist. Quote Link to comment Share on other sites More sharing options...
pakenney38 Posted January 10, 2007 Author Share Posted January 10, 2007 Actually I am also the administrator of the server, so I can do whatever I have to do. I'll give it a shot, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.